nvim: lsp: Remove redundant capabilities settings
The required capabilities to be set are already correctly set by nvim-cmp, no need to set them again. We had added that to enable rust snippet expansion earlier. Also see older revisions of this document. https://github.com/neovim/nvim-lspconfig/wiki/Snippets
This commit is contained in:
parent
cf78dcae4d
commit
b04ecb9541
1 changed files with 6 additions and 17 deletions
|
@ -206,19 +206,8 @@ local determine_setup_lua = function ()
|
|||
return library, runtime_path, lua_version()
|
||||
end
|
||||
|
||||
local get_snippet_capabilities = function()
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
|
||||
capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
capabilities.textDocument.completion.completionItem.resolveSupport = {
|
||||
properties = {
|
||||
'documentation',
|
||||
'detail',
|
||||
'additionalTextEdits',
|
||||
}
|
||||
}
|
||||
return cmp.update_capabilities(capabilities)
|
||||
end
|
||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||
capabilities = cmp.update_capabilities(capabilities)
|
||||
|
||||
local rust_tool_opts = {
|
||||
tools = {
|
||||
|
@ -245,7 +234,7 @@ local rust_tool_opts = {
|
|||
},
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
capabilities = get_snippet_capabilities(),
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
checkOnSave = {
|
||||
|
@ -260,13 +249,13 @@ local servers = { 'hls', 'pylsp', 'tsserver' }
|
|||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = get_snippet_capabilities(),
|
||||
capabilities = capabilities
|
||||
}
|
||||
end
|
||||
|
||||
nvim_lsp.clangd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = get_snippet_capabilities(),
|
||||
capabilities = capabilities,
|
||||
default_config = {
|
||||
cmd = { "clangd", "--background-index", "--pch-storage=memory", "--clang-tidy", "--suggest-missing-includes" },
|
||||
filetypes = { 'c', 'cpp' },
|
||||
|
@ -286,7 +275,7 @@ local library, runtime_path, lua_version = determine_setup_lua()
|
|||
nvim_lsp.sumneko_lua.setup {
|
||||
cmd = { "/usr/bin/lua-language-server" };
|
||||
on_attach = on_attach,
|
||||
capabilities = get_snippet_capabilities(),
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = {
|
||||
|
|
Loading…
Reference in a new issue