added new cmake lsp
This commit is contained in:
parent
b87bbaee74
commit
d62c914ea5
@ -178,10 +178,26 @@ return {
|
|||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
}
|
}
|
||||||
|
|
||||||
lspconfig['cmake'].setup {
|
-- lspconfig['cmake'].setup {
|
||||||
capabilities = capabilities,
|
-- capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
-- on_attach = on_attach,
|
||||||
|
-- }
|
||||||
|
|
||||||
|
local configs = require('lspconfig.configs')
|
||||||
|
if not configs.neocmake then
|
||||||
|
configs.neocmake = {
|
||||||
|
default_config = {
|
||||||
|
cmd = { 'neocmakelsp', '--stdio' },
|
||||||
|
filetypes = { 'cmake' },
|
||||||
|
root_dir = function(fname)
|
||||||
|
return lspconfig.util.find_git_ancestor(fname)
|
||||||
|
end,
|
||||||
|
single_file_support = true, -- suggested
|
||||||
|
on_attach = on_attach -- on_attach is the on_attach function you defined
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
lspconfig.neocmake.setup({})
|
||||||
|
end
|
||||||
|
|
||||||
local clangd_capabilities = capabilities
|
local clangd_capabilities = capabilities
|
||||||
clangd_capabilities.textDocument.semanticHighlighting = true
|
clangd_capabilities.textDocument.semanticHighlighting = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user