aboutsummaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2021-06-26 11:06:43 +0800
committerjdhao <jdhao@hotmail.com>2021-06-26 11:06:43 +0800
commit753a4ce77c95cbcac07674d9522fbaf0569c41d5 (patch)
tree943c14dd3cf77a6a12eeea40b88d6bf64651d9d2 /lua
parent7ef7fe68c6d75d43de7a67a78a2bf05d6767a5d0 (diff)
Switch to clangd for nvim-lsp
ccls has some false positive warnings, and it is hard to install on Linux server without roor rights.
Diffstat (limited to 'lua')
-rw-r--r--lua/lsp/init.lua14
1 files changed, 4 insertions, 10 deletions
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 }