summaryrefslogtreecommitdiffstats
path: root/.config/nvim/plug-config/vim-lsp.vim
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-11-13 19:17:26 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-11-13 19:17:26 +0100
commit9d7ba75e7864867398e8fa46fa65b3d6aabed672 (patch)
tree0e6f7988eb3a5933faaba7e0f51b0ca46c240204 /.config/nvim/plug-config/vim-lsp.vim
parentAdded vim function to auto export ms files to pdf (diff)
downloaddotfiles-bsd-9d7ba75e7864867398e8fa46fa65b3d6aabed672.tar.gz
dotfiles-bsd-9d7ba75e7864867398e8fa46fa65b3d6aabed672.tar.bz2
dotfiles-bsd-9d7ba75e7864867398e8fa46fa65b3d6aabed672.tar.xz
dotfiles-bsd-9d7ba75e7864867398e8fa46fa65b3d6aabed672.tar.zst
dotfiles-bsd-9d7ba75e7864867398e8fa46fa65b3d6aabed672.zip
New lsp, coc sucks
Diffstat (limited to '')
-rw-r--r--.config/nvim/plug-config/vim-lsp.vim14
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