diff --git a/bundles-init/YouCompleteMe.load.vim b/bundles-init/YouCompleteMe.load.vim deleted file mode 100644 index 47922d0..0000000 --- a/bundles-init/YouCompleteMe.load.vim +++ /dev/null @@ -1 +0,0 @@ -"NeoBundle "Valloric/YouCompleteMe" diff --git a/bundles-init/vim-lsp.cfg.vim b/bundles-init/vim-lsp.cfg.vim index 0de0404..1945d1f 100644 --- a/bundles-init/vim-lsp.cfg.vim +++ b/bundles-init/vim-lsp.cfg.vim @@ -33,9 +33,25 @@ 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'], - \ }) + 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