From 67cdebd227d748c6dc281fdd24a2fee56534fb12 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Thu, 19 Jul 2018 16:00:46 +0200 Subject: nvim: Add LanguageClient and RLS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- nvim/init.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nvim/init.vim b/nvim/init.vim index a67454e..0788450 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -16,6 +16,11 @@ Plug 'airblade/vim-rooter' " Fuzzy finder. Requires fzf package to be installed Plug 'junegunn/fzf.vim' +Plug 'autozimu/LanguageClient-neovim', { + \ 'branch': 'next', + \ 'do': 'bash install.sh', + \ } + " Better syntax highlighting Plug 'rust-lang/rust.vim' Plug 'tpope/vim-git' @@ -38,6 +43,13 @@ let g:lightline = { " Fzf let g:fzf_command_prefix = 'Fzf' +" Language Client +let g:LanguageClient_serverCommands = { + \ 'rust': ['rustup', 'run', 'nightly', 'rls'], + \ } +let g:LanguageClient_autoStart = 1 +nnoremap f :call LanguageClient_textDocument_formatting() + """ " NVim settings @@ -98,7 +110,6 @@ augroup END autocmd VimResized * redraw! - """ " Mappings " -- cgit v1.2.3-54-g00ecf