AutoYADM commit: 2025-06-10 22:48:37
This commit is contained in:
parent
d4d2836c97
commit
a8d8881de4
1 changed files with 0 additions and 55 deletions
|
@ -210,58 +210,3 @@ hook -group lsp-filetype-typst global BufSetOption filetype=typst %{
|
||||||
# lsp-menu %arg{@}
|
# lsp-menu %arg{@}
|
||||||
# }
|
# }
|
||||||
|
|
||||||
provide-module lsp-diag %~
|
|
||||||
evaluate-commands %sh{ ${kak_config}/scripts/lsp-diags.py }
|
|
||||||
|
|
||||||
define-command lsp-diag-set %{
|
|
||||||
evaluate-commands %sh{
|
|
||||||
printf 'set %s\n' "$kak_opt_lsp_inline_diagnostics" >"$kak_opt_diagpipe_in"
|
|
||||||
read result < "$kak_opt_diagpipe_out"
|
|
||||||
if [ "$result" != "ok" ]; then
|
|
||||||
echo "info 'lsp-diag failed to set'"
|
|
||||||
else
|
|
||||||
echo "nop"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -params 2 lsp-diag-query %{
|
|
||||||
evaluate-commands %sh{
|
|
||||||
printf 'query %s %s\n' "$1" "$2" >"$kak_opt_diagpipe_in"
|
|
||||||
read result < "$kak_opt_diagpipe_out"
|
|
||||||
if [ "$result" = "true" ]; then
|
|
||||||
echo "trigger-user-hook lsp-diag-hover-true"
|
|
||||||
else
|
|
||||||
echo "trigger-user-hook lsp-diag-hover-false"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hook global KakEnd .* %{
|
|
||||||
nop %sh{
|
|
||||||
printf 'exit\n' >"$kak_opt_diagpipe_in"
|
|
||||||
read result < "$kak_opt_diagpipe_out"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command lsp-diag-hover-enable %{
|
|
||||||
hook window User lsp-diag-hover-false %{
|
|
||||||
try inlay-diagnostics-off
|
|
||||||
}
|
|
||||||
|
|
||||||
hook window User lsp-diag-hover-true %{
|
|
||||||
try inlay-diagnostics-on
|
|
||||||
}
|
|
||||||
|
|
||||||
hook window NormalIdle .* %{
|
|
||||||
lsp-diag-query %val{cursor_line} %val{cursor_column}
|
|
||||||
}
|
|
||||||
hook window WinSetOption lsp_inline_diagnostics=.* %{
|
|
||||||
lsp-diag-set
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
hook global User lsp-enabled %{
|
|
||||||
lsp-diag-hover-enable
|
|
||||||
}
|
|
||||||
~
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue