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:
parent
7ef7fe68c6
commit
753a4ce77c
@ -41,11 +41,6 @@ if executable('sbcl')
|
|||||||
" Plug 'kovisoft/slimv'
|
" Plug 'kovisoft/slimv'
|
||||||
Plug 'vlime/vlime', {'rtp': 'vim/', 'for': 'lisp'}
|
Plug 'vlime/vlime', {'rtp': 'vim/', 'for': 'lisp'}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" C++ semantic highlighting
|
|
||||||
if executable('ccls')
|
|
||||||
Plug 'jackguo380/vim-lsp-cxx-highlight'
|
|
||||||
endif
|
|
||||||
"}}
|
"}}
|
||||||
|
|
||||||
"{{ Search related plugins
|
"{{ Search related plugins
|
||||||
|
|||||||
@ -70,16 +70,10 @@ lspconfig.pyls.setup {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- set up ccls, see https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md#ccls
|
lspconfig.clangd.setup{
|
||||||
if vim.fn.executable('ccls') then
|
on_attach = on_attach,
|
||||||
lspconfig.ccls.setup {
|
filetypes = { "c", "cpp", "cc" }
|
||||||
on_attach = on_attach,
|
}
|
||||||
root_dir = lspconfig.util.root_pattern("compile_commands.json", ".ccls", ".git"),
|
|
||||||
init_options = {
|
|
||||||
highlight = { lsRanges = true }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
-- set up vim-language-server
|
-- set up vim-language-server
|
||||||
lspconfig.vimls.setup{ on_attach = on_attach }
|
lspconfig.vimls.setup{ on_attach = on_attach }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user