Various changes related to language support

This commit is contained in:
Emmanuel BENOîT 2020-10-23 13:46:47 +02:00
parent 7a345afa6f
commit a4a87df17d
2 changed files with 21 additions and 6 deletions

View file

@ -1 +0,0 @@
"NeoBundle "Valloric/YouCompleteMe"

View file

@ -39,3 +39,19 @@ if executable('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