-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textEdit completion item property is not resolved lazily #72
Comments
Same issue on my end. A workaround for now is to use the 2024-09-30 release of rust-analyzer. |
Another workaround is to not override the default |
Actually require("cmp_nvim_lsp").default_capabilities(
{
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
"sortText",
"filterText",
"insertText",
"insertTextFormat",
"insertTextMode"
}
}
}
) imo this is better than not having to override the complete cmp default capabilities. |
Doing local capabilities = require("cmp_nvim_lsp").default_capabilities(
{
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
"sortText",
"filterText",
"insertText",
"insertTextFormat",
"insertTextMode"
}
}
}
)
vim.g.rustaceanvim = {
server = {
capabilities = capabilities,
... with the newest ra version didnt work for me |
Repro with minimal config:
|
Hmm, met the same issue now with the latest version (and I can confirm it is the recently commit will cause this problem). |
@VVishion for me what fixed it with the vim.g.rustaceanvim = {
server = {
capabilities = vim.lsp.protocol.make_client_capabilities(),
}
} |
…ocompleting See rust-lang/rust-analyzer#18503 and hrsh7th/cmp-nvim-lsp#72 for more info
@marcelarie It works, thanks. |
For me it works the same as capabilities = {
textDocument = {
completion = {
completionItem = {
snippetSupport = false,
},
},
},
}, Now some snippets doesn't work. For example: |
Also issue doesn't occur if first item selected. |
IMHO a very high severity issue. It frequently breaks workflows and often results in unusable completions. |
causing unintentional confirm on a completion when cycling through items Ref.: hrsh7th/cmp-nvim-lsp#72
I think this might be a better solution(temporarily) as to {
"hrsh7th/nvim-cmp",
opts = function(_, opts)
local cmp = require("cmp")
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<Tab>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), -- This used to be `cmp.SelectBehavior.Insert`
["<S-Tab>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
})
end,
}, |
rust-analyzer 2024-10-07 and newer does not send the
textEdit
completion property by if the client can resolve it lazily, introduced in rust-lang/rust-analyzer#18167.cmp-nvim-lsp includes
textEdit
in itsdefault_capabilities
but does not seem to resolve it lazily, breaking completion:Observed with
textEdit
in capabilities:(pressing Enter to complete)
Expected, without
textEdit
in capabilities:(pressing Enter to complete)
The text was updated successfully, but these errors were encountered: