Vim lsp will work using system clangd now
This commit is contained in:
parent
c3114439e8
commit
5ffa94ae86
1 changed files with 16 additions and 0 deletions
16
plugins.vim
16
plugins.vim
|
|
@ -84,6 +84,22 @@ augroup lsp_install
|
|||
autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled()
|
||||
augroup END
|
||||
|
||||
" C++ Clangd if installed on system already
|
||||
if executable('clangd')
|
||||
augroup lsp_clangd
|
||||
autocmd!
|
||||
autocmd User lsp_setup call lsp#register_server({
|
||||
\ 'name': 'clangd',
|
||||
\ 'cmd': {server_info->['clangd']},
|
||||
\ 'whitelist': ['h', '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
|
||||
|
||||
" GLSL
|
||||
autocmd! BufNewFile,BufRead *.vs,*.fs,*.glsl,*.frag,*.vert set ft=glsl
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue