Improve parse error display in clang.kak
This commit is contained in:
parent
d1732673ce
commit
24372938c5
|
@ -97,7 +97,6 @@ def -hidden clang-show-completion-info %[ try %[
|
||||||
eval -draft %[
|
eval -draft %[
|
||||||
exec '<space>{(<a-k>^\(<ret>b'
|
exec '<space>{(<a-k>^\(<ret>b'
|
||||||
%sh[
|
%sh[
|
||||||
# desc=$(echo "${kak_opt_clang_completions}" | sed -e 's/\([^\\]\):/\1\n/g;' | sed -ne "/^${kak_selection}@/ { s/^[^@]\+@//; s/@.*$//; s/\\:/:/g; p }")
|
|
||||||
desc=$(echo "${kak_opt_clang_completions}" | sed -ne "{ s/\([^\\]\):/\1\n/g }; /^${kak_selection}@/ { s/^[^@]\+@//; s/@.*$//; s/\\\:/:/g; P }; D")
|
desc=$(echo "${kak_opt_clang_completions}" | sed -ne "{ s/\([^\\]\):/\1\n/g }; /^${kak_selection}@/ { s/^[^@]\+@//; s/@.*$//; s/\\\:/:/g; P }; D")
|
||||||
if [ -n "$desc" ]; then
|
if [ -n "$desc" ]; then
|
||||||
echo "eval -client $kak_client %{info -anchor ${kak_cursor_line}.${kak_cursor_column} -placement above %{${desc}}}"
|
echo "eval -client $kak_client %{info -anchor ${kak_cursor_line}.${kak_cursor_column} -placement above %{${desc}}}"
|
||||||
|
@ -125,8 +124,8 @@ def clang-disable-autocomplete -docstring "Disable automatic clang completion" %
|
||||||
}
|
}
|
||||||
|
|
||||||
def -hidden clang-show-error-info %{ %sh{
|
def -hidden clang-show-error-info %{ %sh{
|
||||||
printf %s "${kak_opt_clang_errors}" | grep "^${kak_cursor_line},.*" | if read line; then
|
desc=$(printf %s "${kak_opt_clang_errors}" | sed -ne "/^${kak_cursor_line},.*/ { s/^[[:digit:]]\+,//g; s/'/\\\\'/g; p }")
|
||||||
desc=$(printf %s "${line}" | sed -e "s/^[[:digit:]]\+,//g; s/'/\\\\'/g")
|
if [ -n "$desc" ]; then
|
||||||
echo "info -anchor ${kak_cursor_line}.${kak_cursor_column} '${desc}'"
|
echo "info -anchor ${kak_cursor_line}.${kak_cursor_column} '${desc}'"
|
||||||
fi
|
fi
|
||||||
} }
|
} }
|
||||||
|
|
Loading…
Reference in New Issue
Block a user