diff --git a/.config/kak/autoload/lsp.kak b/.config/kak/autoload/lsp.kak index 87b922e2..5e389c57 100644 --- a/.config/kak/autoload/lsp.kak +++ b/.config/kak/autoload/lsp.kak @@ -237,15 +237,7 @@ define-command -params 2 lsp-diag-query %{ } } -hook global KakEnd .* %{ - nop %sh{ - printf 'exit\n' >"$kak_opt_diagpipe_in" - read result < "$kak_opt_diagpipe_out" - } -} - - -hook global User lsp-enabled %{ +define-command lsp-diag-hover-enable %{ hook window User lsp-diag-hover-false %{ try inlay-diagnostics-off } @@ -260,5 +252,16 @@ hook global User lsp-enabled %{ hook window WinSetOption lsp_inline_diagnostics=.* %{ lsp-diag-set } + hook global KakEnd .* %{ + nop %sh{ + printf 'exit\n' >"$kak_opt_diagpipe_in" + read result < "$kak_opt_diagpipe_out" + } + } + +} + +hook global User lsp-enabled %{ + lsp-diag-hover-enable } ~