mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +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
@@ -913,7 +913,21 @@ describe('LSP', function()
|
||||
}, buf_lines(target_bufnr))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('workspace_apply_edit', function()
|
||||
it('workspace/applyEdit returns ApplyWorkspaceEditResponse', function()
|
||||
local expected = {
|
||||
applied = true;
|
||||
failureReason = nil;
|
||||
}
|
||||
eq(expected, exec_lua [[
|
||||
local apply_edit = {
|
||||
label = nil;
|
||||
edit = {};
|
||||
}
|
||||
return vim.lsp.callbacks['workspace/applyEdit'](nil, nil, apply_edit)
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
describe('completion_list_to_complete_items', function()
|
||||
-- Completion option precedence:
|
||||
-- textEdit.newText > insertText > label
|
||||
|
||||
Reference in New Issue
Block a user