From fd9ca401c4e556eee9c9e30c0dc57c9ced41c7ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Wed, 2 Dec 2020 21:37:41 +0100 Subject: [PATCH] Use vim-lsp-settings instead of manual config --- bundles-init/vim-lsp-settings.load.vim | 1 + bundles-init/vim-lsp.cfg.vim | 42 -------------------------- 2 files changed, 1 insertion(+), 42 deletions(-) create mode 100644 bundles-init/vim-lsp-settings.load.vim diff --git a/bundles-init/vim-lsp-settings.load.vim b/bundles-init/vim-lsp-settings.load.vim new file mode 100644 index 0000000..9fd75c7 --- /dev/null +++ b/bundles-init/vim-lsp-settings.load.vim @@ -0,0 +1 @@ +NeoBundle 'mattn/vim-lsp-settings' diff --git a/bundles-init/vim-lsp.cfg.vim b/bundles-init/vim-lsp.cfg.vim index 1945d1f..56c3aff 100644 --- a/bundles-init/vim-lsp.cfg.vim +++ b/bundles-init/vim-lsp.cfg.vim @@ -13,45 +13,3 @@ noremap :LspDefinition noremap dR :LspRename noremap dh :LspHover noremap ds :LspWorkspaceSymbol - -"----------------------------- -" CONFIGURE VARIOUS SERVERS -"----------------------------- - -" Rust -if executable('rustup') - au User lsp_setup call lsp#register_server({ - \ 'name': 'rust' , - \ 'cmd' : {server_info->[ - \ &shell, - \ &shellcmdflag, - \ 'rustup run stable rls'] - \ } , - \ 'whitelist' : [ 'rust' ] , - \ }) -endif - -" Python (requires pip install python-language-server) -if executable('pyls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'pyls', - \ 'cmd': {server_info->['pyls']}, - \ 'whitelist': ['python'], - \ }) -endif - -" C/C++ through Clangd -if executable('clangd') - augroup lsp_clangd - autocmd! - autocmd User lsp_setup call lsp#register_server({ - \ 'name': 'clangd', - \ 'cmd': {server_info->['clangd']}, - \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'], - \ }) - autocmd FileType c setlocal omnifunc=lsp#complete - autocmd FileType cpp setlocal omnifunc=lsp#complete - autocmd FileType objc setlocal omnifunc=lsp#complete - autocmd FileType objcpp setlocal omnifunc=lsp#complete - augroup end -endif