diff --git a/files/vim/.vimrc b/files/vim/.vimrc index 08d3c25..58a05f0 100644 --- a/files/vim/.vimrc +++ b/files/vim/.vimrc @@ -24,6 +24,11 @@ Plug 'sainnhe/everforest' " color scheme Plug 'vim-airline/vim-airline' " a nicer status line Plug 'vim-airline/vim-airline-themes' " auto settings theme for airline +Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'bash install.sh', + \ } + call plug#end() " ============================== Colors syntax on @@ -124,3 +129,18 @@ fun! TrimWhitespace() call winrestview(l:save) endfun noremap ws :call TrimWhitespace() + +map :messages + +" ============================== LSP +set hidden +let g:LanguageClient_serverCommands = { + \ 'rust': ['~/.cargo/bin/rust-analyzer'], + \ 'python': ['/usr/bin/pylsp'], + \ 'c': ['/usr/bin/clang'], + \ 'cpp': ['/usr/bin/clangd'], + \ } + +nnoremap :call LanguageClient_contextMenu() +map :call LanguageClient#textDocument_rename() +map :call LanguageClient#textDocument_definition()