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
|
-- License : GPLv3
|
||||||
-- Description : clangd config file for lsp
|
-- 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 {
|
require("lspconfig").clangd.setup {
|
||||||
cmd = { "clangd",
|
cmd = { "clangd",
|
||||||
"--background-index",
|
"--background-index",
|
||||||
"--suggest-missing-includes",
|
"--suggest-missing-includes",
|
||||||
"--clang-tidy",
|
"--clang-tidy",
|
||||||
"--header-insertion=iwyu"
|
"--header-insertion=iwyu"
|
||||||
}
|
},
|
||||||
|
-- The following example advertise capabilities to `clangd`.
|
||||||
|
capabilities = capabilities,
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ require'lspconfig'.sumneko_lua.setup {
|
|||||||
},
|
},
|
||||||
diagnostics = {
|
diagnostics = {
|
||||||
-- Get the language server to recognize the `vim` global
|
-- Get the language server to recognize the `vim` global
|
||||||
globals = {'vim'},
|
globals = {"vim", "use", "globals", "utils"},
|
||||||
},
|
},
|
||||||
workspace = {
|
workspace = {
|
||||||
-- Make the server aware of Neovim runtime files
|
-- Make the server aware of Neovim runtime files
|
||||||
|
Reference in New Issue
Block a user