~ntgg/dotfiles

fccd2520360823048b8297d440e1c2711947c7ae — Noah Graff 5 months ago 22aea78
use plug.kak for kak-lsp
1 files changed, 17 insertions(+), 7 deletions(-)

M .config/kak/kakrc
M .config/kak/kakrc => .config/kak/kakrc +17 -7
@@ 72,7 72,6 @@ hook global WinCreate ^[^*]+$ %{

filetype-hook rust %{
    set-option buffer formatcmd 'rustfmt'
    set-option buffer lsp_server_configuration rust.clippy_preference="on"
}

filetype-hook c %{


@@ 162,14 161,25 @@ plug "andreyorst/fzf.kak" config %{
    # set-option global fzf_highlight_cmd 'bat'
}

eval %sh{kak-lsp --kakoune -s $kak_session}
define-command lsp-restart -docstring 'restart the language server' %{ lsp-stop; lsp-start }
filetype-hook rust|python|c %{
    lsp-enable-window
    map window user 'l' ': enter-user-mode lsp<ret>' -docstring 'enter lsp mode'
    map window lsp 'R' ': lsp-rename-prompt<ret>' -docstring 'rename the symbol beneath the cursor'
plug "ul/kak-lsp" do %{
    cargo build --release --locked
    cargo install --force --path .
} config %{
    define-command lsp-restart -docstring 'restart the language server' %{ lsp-stop; lsp-start }

    filetype-hook rust %{
        set-option buffer lsp_server_configuration rust.clippy_preference="on"
    }

    filetype-hook rust|python|c %{
        lsp-enable-window
        map window user 'l' ': enter-user-mode lsp<ret>' -docstring 'enter lsp mode'
        map window lsp 'R' ': lsp-rename-prompt<ret>' -docstring 'rename the symbol beneath the cursor'
    }

    hook global KakEnd .* lsp-exit
}


colorscheme gruvbox