mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
Switch to clangd for nvim-lsp
ccls has some false positive warnings, and it is hard to install on Linux server without roor rights.
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user