mirror of
https://github.com/neovim/neovim.git
synced 2025-12-07 23:22:39 +00:00
LSP: Make applyEdit return a response (#12270)
According to the specification workspace/applyEdit needs to respond with a `ApplyWorkspaceEditResponse` See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_applyEdit This is a subset of https://github.com/neovim/neovim/pull/11607
This commit is contained in:
committed by
GitHub
parent
9816173fb3
commit
55b62a937c
@@ -17,7 +17,11 @@ M['workspace/applyEdit'] = function(_, _, workspace_edit)
|
||||
if workspace_edit.label then
|
||||
print("Workspace edit", workspace_edit.label)
|
||||
end
|
||||
util.apply_workspace_edit(workspace_edit.edit)
|
||||
local status, result = pcall(util.apply_workspace_edit, workspace_edit.edit)
|
||||
return {
|
||||
applied = status;
|
||||
failureReason = result;
|
||||
}
|
||||
end
|
||||
|
||||
M['textDocument/publishDiagnostics'] = function(_, _, result)
|
||||
|
||||
Reference in New Issue
Block a user