diff --git a/.config/kak/autoload/lsp.kak b/.config/kak/autoload/lsp.kak index e6fdb8e4..e8b010f3 100644 --- a/.config/kak/autoload/lsp.kak +++ b/.config/kak/autoload/lsp.kak @@ -48,21 +48,40 @@ define-command -hidden inlay-toggle %{ } } -declare-option -hidden bool diagnostics_enabled false -define-command -hidden diagnostics-on %{ +declare-option -hidden bool inlay_diagnostics_enabled false +define-command -hidden inlay_diagnostics-on %{ lsp-inlay-diagnostics-enable window - set-option window diagnostics_enabled true + set-option window inlay-diagnostics_enabled true } -define-command -hidden diagnostics-off %{ +define-command -hidden inlay-diagnostics-off %{ lsp-inlay-diagnostics-disable window - set-option window diagnostics_enabled false + set-option window inlay_diagnostics_enabled false } -define-command -hidden diagnostics-toggle %{ +define-command -hidden inlay-diagnostics-toggle %{ evaluate-commands %sh{ - if [ "$kak_opt_diagnostics_enabled" = "true" ]; then - echo "diagnostics-off" + if [ "$kak_opt_inlay_diagnostics_enabled" = "true" ]; then + echo "inlay-diagnostics-off" else - echo "diagnostics-on" + echo "inlay-diagnostics-on" + fi + } +} + +declare-option -hidden bool inline_diagnostics_enabled true +define-command -hidden inline-diagnostics-on %{ + lsp-inline-diagnostics-enable window + set-option window inline-diagnostics_enabled true +} +define-command -hidden inline-diagnostics-off %{ + lsp-inline-diagnostics-disable window + set-option window inline_diagnostics_enabled false +} +define-command inline-diagnostics-toggle %{ + evaluate-commands %sh{ + if [ "$kak_opt_inline_diagnostics_enabled" = "true" ]; then + echo "inline-diagnostics-off" + else + echo "inline-diagnostics-on" fi } }