From 654fc2ee7b70028f3223540fbce41fe905828342 Mon Sep 17 00:00:00 2001 From: Davide Oddone Date: Thu, 7 Dec 2023 13:52:36 +0000 Subject: [PATCH] Cloud version of the kakrc --- kakrc | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/kakrc b/kakrc index f57ef48..b712be8 100644 --- a/kakrc +++ b/kakrc @@ -22,9 +22,10 @@ plug "kak-lsp/kak-lsp" do %{ define-command ee -docstring 'go to current error/warning from lsp' %{ lsp-find-error --include-warnings; lsp-find-error --previous --include-warnings } define-command lsp-restart -docstring 'restart lsp server' %{ lsp-stop; lsp-start } - hook global WinSetOption filetype=(c|cpp|sh|cc|rust|javascript|typescript|go) %{ + hook global WinSetOption filetype=(c|cpp|sh|cc|rust|javascript|typescript|go|python) %{ set-option window lsp_auto_highlight_references true set-option window lsp_hover_anchor false + map window insert lsp-next-location lsp-auto-hover-enable echo -debug "Enabling LSP for filtetype %opt{filetype}" lsp-enable-window @@ -42,20 +43,29 @@ plug "kak-lsp/kak-lsp" do %{ } } + map global user l %{:enter-user-mode lsp} -docstring "LSP mode" + map global insert ':try lsp-snippets-select-next-placeholders catch %{ execute-keys -with-hooks tab> }' -docstring 'Select next snippet placeholder' + map global object a 'lsp-object' -docstring 'LSP any symbol' + map global object 'lsp-object' -docstring 'LSP any symbol' + map global object e 'lsp-object Function Method' -docstring 'LSP function or method' + map global object k 'lsp-object Class Interface Struct' -docstring 'LSP class interface or struct' + map global object d 'lsp-diagnostic-object --include-warnings' -docstring 'LSP errors and warnings' + map global object D 'lsp-diagnostic-object' -docstring 'LSP errors' + hook global KakEnd .* lsp-exit } # Substitute c-n with tab -hook global InsertCompletionShow .* %{ - try %{ - execute-keys -draft 'h\h' - map window insert - map window insert - hook -once -always window InsertCompletionHide .* %{ - map window insert - map window insert - } - } -} +#hook global InsertCompletionShow .* %{ +# try %{ +# execute-keys -draft 'h\h' +# map window insert +# map window insert +# hook -once -always window InsertCompletionHide .* %{ +# map window insert +# map window insert +# } +# } +#} # enable auto pair closing enable-auto-pairs # yaml linter