feat: update lsp config
c: make nvim-cmp capabalities available lua: ignore some non-standard keywords
This commit is contained in:
parent
05d89420f0
commit
101d37ff52
@ -3,11 +3,18 @@
|
||||
-- License : GPLv3
|
||||
-- Description : clangd config file for lsp
|
||||
|
||||
-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers..
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
|
||||
|
||||
|
||||
require("lspconfig").clangd.setup {
|
||||
cmd = { "clangd",
|
||||
"--background-index",
|
||||
"--suggest-missing-includes",
|
||||
"--clang-tidy",
|
||||
"--header-insertion=iwyu"
|
||||
}
|
||||
},
|
||||
-- The following example advertise capabilities to `clangd`.
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ require'lspconfig'.sumneko_lua.setup {
|
||||
},
|
||||
diagnostics = {
|
||||
-- Get the language server to recognize the `vim` global
|
||||
globals = {'vim'},
|
||||
globals = {"vim", "use", "globals", "utils"},
|
||||
},
|
||||
workspace = {
|
||||
-- Make the server aware of Neovim runtime files
|
||||
|
Reference in New Issue
Block a user