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

@ -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