mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
feat(lsp): add support for completionItem.command resolving
`command` was already resolved via a `completionItem/resolve` request but only if `additionalTextEdits` were also present, and the `resolveSupport` capability wasn't listed. Closes https://github.com/neovim/neovim/issues/32406
This commit is contained in:
committed by
Mathias Fußenegger
parent
c091bc3b9a
commit
f20335a54c
@@ -610,13 +610,14 @@ local function on_complete_done()
|
||||
clear_word()
|
||||
if err then
|
||||
vim.notify_once(err.message, vim.log.levels.WARN)
|
||||
elseif result and result.additionalTextEdits then
|
||||
lsp.util.apply_text_edits(result.additionalTextEdits, bufnr, position_encoding)
|
||||
elseif result then
|
||||
if result.additionalTextEdits then
|
||||
lsp.util.apply_text_edits(result.additionalTextEdits, bufnr, position_encoding)
|
||||
end
|
||||
if result.command then
|
||||
completion_item.command = result.command
|
||||
end
|
||||
end
|
||||
|
||||
apply_snippet_and_command()
|
||||
end, bufnr)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user