From a8d8881de4fca0e9b40d59dbf06f49c2d5fc8574 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Tue, 10 Jun 2025 22:48:37 -0400 Subject: [PATCH] AutoYADM commit: 2025-06-10 22:48:37 --- .config/kak/autoload/lsp.kak | 55 ------------------------------------ 1 file changed, 55 deletions(-) diff --git a/.config/kak/autoload/lsp.kak b/.config/kak/autoload/lsp.kak index a9ca4889..a989a712 100644 --- a/.config/kak/autoload/lsp.kak +++ b/.config/kak/autoload/lsp.kak @@ -210,58 +210,3 @@ hook -group lsp-filetype-typst global BufSetOption filetype=typst %{ # 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 -} -~