diff --git a/rc/clang.kak b/rc/clang.kak index 1b14b80f..c48a4612 100644 --- a/rc/clang.kak +++ b/rc/clang.kak @@ -61,7 +61,9 @@ def -shell-params clang-parse -docstring "Parse the contents of the current buff for (id in docstrings) { 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 } }' | sort | paste -s -d ':' | sed -e "s/\\\\n/\\n/g; s/'/\\\\'/g")