mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(lsp): correctly check for "codeAction/resolve" support
This commit is contained in:

committed by
Christian Clason

parent
026cfa28d0
commit
f8d5811c71
@@ -1152,7 +1152,7 @@ local function on_code_action_results(results, opts)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if not action.edit or not action.command and client:supports_method(ms.codeAction_resolve) then
|
if not (action.edit and action.command) and client:supports_method(ms.codeAction_resolve) then
|
||||||
client:request(ms.codeAction_resolve, action, function(err, resolved_action)
|
client:request(ms.codeAction_resolve, action, function(err, resolved_action)
|
||||||
if err then
|
if err then
|
||||||
-- If resolve fails, try to apply the edit/command from the original code action.
|
-- If resolve fails, try to apply the edit/command from the original code action.
|
||||||
|
Reference in New Issue
Block a user