From 753a4ce77c95cbcac07674d9522fbaf0569c41d5 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 26 Jun 2021 11:06:43 +0800 Subject: [PATCH] Switch to clangd for nvim-lsp ccls has some false positive warnings, and it is hard to install on Linux server without roor rights. --- core/plugins.vim | 5 ----- lua/lsp/init.lua | 14 ++++---------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/core/plugins.vim b/core/plugins.vim index 4d0e2c3..c310a1e 100644 --- a/core/plugins.vim +++ b/core/plugins.vim @@ -41,11 +41,6 @@ if executable('sbcl') " Plug 'kovisoft/slimv' Plug 'vlime/vlime', {'rtp': 'vim/', 'for': 'lisp'} endif - -" C++ semantic highlighting -if executable('ccls') - Plug 'jackguo380/vim-lsp-cxx-highlight' -endif "}} "{{ Search related plugins diff --git a/lua/lsp/init.lua b/lua/lsp/init.lua index 6b4b557..2728570 100644 --- a/lua/lsp/init.lua +++ b/lua/lsp/init.lua @@ -70,16 +70,10 @@ lspconfig.pyls.setup { } } --- set up ccls, see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#ccls -if vim.fn.executable('ccls') then - lspconfig.ccls.setup { - on_attach = on_attach, - root_dir = lspconfig.util.root_pattern("compile_commands.json", ".ccls", ".git"), - init_options = { - highlight = { lsRanges = true } - } - } -end +lspconfig.clangd.setup{ + on_attach = on_attach, + filetypes = { "c", "cpp", "cc" } +} -- set up vim-language-server lspconfig.vimls.setup{ on_attach = on_attach }