From c1e404a144bfbf297452d80b78c8667e00201cff Mon Sep 17 00:00:00 2001 From: arnaucube Date: Thu, 3 Mar 2022 23:08:13 +0100 Subject: [PATCH] Update neovim config Update neovim config: add coc.vim to be used with LanguageClient --- init.vim | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/init.vim b/init.vim index a418078..51905a0 100644 --- a/init.vim +++ b/init.vim @@ -54,24 +54,24 @@ Plug 'iden3/vim-circom-syntax' " LaTeX support. It needs latexmk & zathura Plug 'lervag/vimtex' -" -" " deoplete -" Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } + +" deoplete +Plug 'Shougo/deoplete.nvim' +let g:deoplete#enable_at_startup = 1 +autocmd CompleteDone * pclose! " Plug 'zchee/deoplete-go', {'build': {'unix': 'make'}} " " neosnippet with deoplete " Plug 'Shougo/neosnippet.vim' " Plug 'Shougo/neosnippet-snippets' +" " Plugin deoplete neosnippet key-mappings. +" " Note: It must be "imap" and "smap". It uses mappings. +" imap (neosnippet_expand_or_jump) +" smap (neosnippet_expand_or_jump) +" xmap (neosnippet_expand_target) " automatically adjust shiftwidth and expand tab based on current file Plug 'tpope/vim-sleuth' -" let g:deoplete#enable_at_startup = 1 -" Plugin deoplete neosnippet key-mappings. -" Note: It must be "imap" and "smap". It uses mappings. -imap (neosnippet_expand_or_jump) -smap (neosnippet_expand_or_jump) -xmap (neosnippet_expand_target) - " errors Plug 'Valloric/ListToggle' @@ -79,6 +79,9 @@ Plug 'autozimu/LanguageClient-neovim', { \ 'branch': 'next', \ 'do': 'bash install.sh', \ } +Plug 'neoclide/coc.nvim', {'branch': 'release'} +" after PlugInstall, install coc-rust-analyzer: +" :CocInstall coc-rust-analyzer " focus mode Plug 'junegunn/goyo.vim' @@ -169,12 +172,14 @@ let g:airline_skip_empty_sections = 1 " errors "" for go needs gopls installed (comes with vim-go pluggin) -"" for rust needs https://github.com/rust-lang/rls installed +"" for rust with rust-analyzer needs https://rust-analyzer.github.io/manual.html#rust-analyzer-language-server-binary installed +"" [old] for rust with rls needs https://github.com/rust-lang/rls installed let g:lt_location_list_toggle_map = 'l' let g:lt_quickfix_list_toggle_map = 's' +" \ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'], let g:LanguageClient_serverCommands = { \ 'go': ['~/go/bin/gopls'], - \ 'rust': ['~/.cargo/bin/rustup', 'run', 'stable', 'rls'], + \ 'rust': ['rust-analyzer'], \ } let g:LanguageClient_diagnosticsList = "Quickfix" let g:LanguageClient_diagnosticsEnable = 1