From 753a4ce77c95cbcac07674d9522fbaf0569c41d5 Mon Sep 17 00:00:00 2001 From: jdhao Date: Sat, 26 Jun 2021 11:06:43 +0800 Subject: Switch to clangd for nvim-lsp ccls has some false positive warnings, and it is hard to install on Linux server without roor rights. --- lua/lsp/init.lua | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'lua') 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 } -- cgit v1.2.3