diff --git a/lsp.vim b/lsp.vim new file mode 100644 index 0000000..47ad729 --- /dev/null +++ b/lsp.vim @@ -0,0 +1,10 @@ +set hidden + +let g:LanguageClient_serverCommands = { + \ 'rust': ['rustup', 'run', 'nightly', 'rls'], + \ } + +nnoremap K :call LanguageClient_textDocument_hover() +nnoremap gd :call LanguageClient_textDocument_definition() +nnoremap :call LanguageClient_textDocument_rename() +nnoremap S :call LanguageClient_textDocument_documentSymbol() diff --git a/plug.vim b/plug.vim index b4081e4..db2f701 100644 --- a/plug.vim +++ b/plug.vim @@ -43,6 +43,8 @@ Plug 'valloric/youcompleteme' " groovy syntax and indent Plug 'vim-scripts/groovy.vim' Plug 'vim-scripts/groovyindent-unix' +" LSP +Plug 'autozimu/LanguageClient-neovim', {'tag': 'binary-*-x86_64-unknown-linux-musl'} " All of your Plugins must be added before the following line call plug#end() " required diff --git a/vimrc b/vimrc index 6cca09e..6dcd774 100644 --- a/vimrc +++ b/vimrc @@ -15,6 +15,7 @@ source fzf.vim source mapping.vim source jsonnet.vim source racer.vim +source lsp.vim exec "cd " . oldwd " turn on file type plugins