diff options
Diffstat (limited to '')
-rw-r--r-- | .config/nvim/plug-config/vim-lsp.vim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.config/nvim/plug-config/vim-lsp.vim b/.config/nvim/plug-config/vim-lsp.vim new file mode 100644 index 0000000..f416557 --- /dev/null +++ b/.config/nvim/plug-config/vim-lsp.vim @@ -0,0 +1,14 @@ +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 |