Show brief comments in clang completion description
This commit is contained in:
parent
314d662c5f
commit
b3a2e4bd25
11
rc/clang.kak
11
rc/clang.kak
|
@ -29,20 +29,21 @@ def clang-complete %{
|
||||||
pos=-:${kak_cursor_line}:${kak_cursor_column}
|
pos=-:${kak_cursor_line}:${kak_cursor_column}
|
||||||
cd $(dirname ${kak_buffile})
|
cd $(dirname ${kak_buffile})
|
||||||
header="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}"
|
header="${kak_cursor_line}.${kak_cursor_column}@${kak_timestamp}"
|
||||||
compl=$(clang++ -x c++ -fsyntax-only ${kak_opt_clang_options} -Xclang -code-completion-at=${pos} - < ${dir}/buf 2> ${dir}/errors |
|
compl=$(clang++ -x ${ft} -fsyntax-only ${kak_opt_clang_options} -Xclang -code-completion-brief-comments -Xclang -code-completion-at=${pos} - < ${dir}/buf 2> ${dir}/errors |
|
||||||
awk -F ': ' -e '
|
awk -F ': ' -e '
|
||||||
/^COMPLETION:/ && ! /\(Hidden\)/ {
|
/^COMPLETION:/ && ! /\(Hidden\)/ {
|
||||||
gsub(/[[{<]#|#[}>]/, "", $3)
|
gsub(/[[{<]#|#[}>]/, "", $3)
|
||||||
gsub(/#]/, " ", $3)
|
gsub(/#]/, " ", $3)
|
||||||
gsub(/:: /, "::", $3)
|
gsub(/:: /, "::", $3)
|
||||||
gsub(/ +$/, "", $3)
|
gsub(/ +$/, "", $3)
|
||||||
gsub(/:/, "\\:", $2)
|
|
||||||
gsub(/:/, "\\:", $3)
|
|
||||||
id=substr($2, 1, length($2)-1)
|
id=substr($2, 1, length($2)-1)
|
||||||
|
gsub(/:/, "\\:", id)
|
||||||
|
desc=$4 ? $3 "\\n" $4 : $3
|
||||||
|
gsub(/:/, "\\:", desc)
|
||||||
if (id in completions)
|
if (id in completions)
|
||||||
completions[id]=completions[id] "\\n" $3
|
completions[id]=completions[id] "\\n" desc
|
||||||
else
|
else
|
||||||
completions[id]=$3
|
completions[id]=desc
|
||||||
}
|
}
|
||||||
END {
|
END {
|
||||||
for (id in completions)
|
for (id in completions)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user