diff --git a/kakrc b/kakrc index 3c5c810..5af338b 100644 --- a/kakrc +++ b/kakrc @@ -22,7 +22,7 @@ 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|cc|rust|javascript|typescript) %{ + hook global WinSetOption filetype=(c|cpp|sh|python) %{ set-option window lsp_auto_highlight_references true set-option window lsp_hover_anchor false lsp-auto-hover-enable @@ -30,18 +30,6 @@ plug "kak-lsp/kak-lsp" do %{ lsp-enable-window } - hook global WinSetOption filetype=(rust) %{ - set window lsp_server_configuration rust.clippy_preference="on" - } - - hook global WinSetOption filetype=rust %{ - hook window BufWritePre .* %{ - evaluate-commands %sh{ - test -f rustfmt.toml && printf lsp-formatting-sync - } - } - } - hook global KakEnd .* lsp-exit } # Substitute c-n with tab @@ -94,29 +82,3 @@ map global user p 'xclip -out -selection clipboard' \ -docstring 'Paste system clipboard after' map global user R '|xclip -out -selection clipboard' \ -docstring 'Replace selection from system clipboard' - -## TESTING: copy and paste from TMUX -#if [ -n "$DISPLAY" ]; then -## printf %s "$kak_main_reg_dquote" | xsel --input --clipboard -#elif [ -n "$TMUX" ]; then -# map global user y 'tmux set-buffer --' -#fi -## Enable different options depending if we are inside TMUX or not -#try %{ -# evaluate-commands %sh{ [ $tmux ] || echo "fail" } -# try %{ -# hook global registermodified '"' %{ nop %sh{ -# tmux set-buffer -- "$kak_main_reg_dquote" -# }} -# map global user p '!tmux show-buffer' -# map global user p 'tmux show-buffer' -# map global user r '|tmux show-buffer' -# } -#} catch %{ -# try %{ -# map global user y 'xclip -in -selection clipboard >&- 2>&-' -# map global user p '!xclip -out -selection clipboard' -# map global user p 'xclip -out -selection clipboard' -# map global user r '|xclip -out -selection clipboard' -# } -#}