clang.kak: Try to detect word boundaries and highlight types/operators
This commit is contained in:
parent
6a236c563c
commit
bb16be6cf2
|
@ -61,7 +61,9 @@ def -shell-params clang-parse -docstring "Parse the contents of the current buff
|
||||||
for (id in docstrings)
|
for (id in docstrings)
|
||||||
{
|
{
|
||||||
menu=id
|
menu=id
|
||||||
gsub(/(operator|new|delete)/, "{keyword}&{}", menu)
|
gsub(/(^|[^[:alnum:]_])(operator|new|delete)($|[^[:alnum:]_])/, "{keyword}&{}", menu)
|
||||||
|
gsub(/(^|[[:space:]])(int|size_t|bool|char|unsigned|signed|long)($|[[:space:]])/, "{type}&{}", menu)
|
||||||
|
gsub(/[^[:alnum:]{}_]+/, "{operator}&{}", menu)
|
||||||
print id "@" docstrings[id] "@" menu
|
print id "@" docstrings[id] "@" menu
|
||||||
}
|
}
|
||||||
}' | sort | paste -s -d ':' | sed -e "s/\\\\n/\\n/g; s/'/\\\\'/g")
|
}' | sort | paste -s -d ':' | sed -e "s/\\\\n/\\n/g; s/'/\\\\'/g")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user