aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp_spec.lua
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2020-05-11 16:56:35 +0200
committerGitHub <noreply@github.com>2020-05-11 16:56:35 +0200
commit55b62a937c27715f7e6c299ae312c38edf08fa74 (patch)
tree10fdd2440100c5ebd7a57db6510159974d81bad1 /test/functional/plugin/lsp_spec.lua
parent9816173fb3bdd7b42943ff770ddcd5c953a77163 (diff)
downloadrneovim-55b62a937c27715f7e6c299ae312c38edf08fa74.tar.gz
rneovim-55b62a937c27715f7e6c299ae312c38edf08fa74.tar.bz2
rneovim-55b62a937c27715f7e6c299ae312c38edf08fa74.zip
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
Diffstat (limited to 'test/functional/plugin/lsp_spec.lua')
-rw-r--r--test/functional/plugin/lsp_spec.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index a263c6527d..e48d50ff47 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -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