From 9d7ba75e7864867398e8fa46fa65b3d6aabed672 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 13 Nov 2020 19:17:26 +0100 Subject: New lsp, coc sucks --- .config/nvim/plug-config/vim-lsp.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .config/nvim/plug-config/vim-lsp.vim (limited to '.config/nvim/plug-config/vim-lsp.vim') 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 -- cgit v1.2.3