diff --git a/.config/kak/autoload/lsp.kak b/.config/kak/autoload/lsp.kak index 5191e174..e6fdb8e4 100644 --- a/.config/kak/autoload/lsp.kak +++ b/.config/kak/autoload/lsp.kak @@ -145,13 +145,28 @@ hook -group lsp-filetype-markdown global BufSetOption filetype=markdown %{ } } -# can override this to customize what's rendered in the menu -define-command -override -hidden lsp-perform-code-action -params 1.. -docstring "Called on :lsp-code-actions" %{ - nop %sh{ - if printf '%s' "$kak_opt_lsp_servers" | grep -q 'harper-ls'; then - notify-send "harper time" - fi - } - lsp-menu %arg{@} -} +# # can be empty, global, or file +# declare-option -hidden str harper_add "" +# define-command -hidden harper-add -params 1 %{ +# set-option window harper_add %arg{1} +# lsp-code-actions -auto-single +# } + +# # can override this to customize what's rendered in the menu +# # Each code action is two args: its name, and the corresponding command +# define-command -override -hidden lsp-perform-code-action -params 1.. -docstring "Called on :lsp-code-actions" %{ +# evaluate-commands %sh{ +# # harper specific filtering +# if printf '%s' "$kak_opt_lsp_servers" | grep -q 'harper-ls'; then +# if [ "$kak_opt_harper_add" = "global" ]; then +# # filter and keep only +# echo "echo -debug 'harper adding global'" +# fi +# fi +# echo "echo -debug dumping $# code actions args:" +# echo "echo -debug %arg{@}" + +# } +# lsp-menu %arg{@} +# }