From 3f526feebfe6d7bf71380a24639a3dd908f77ff6 Mon Sep 17 00:00:00 2001 From: Jose Alvarez Date: Mon, 6 Sep 2021 04:48:54 +0900 Subject: [PATCH] fix(lsp): update workspace/applyEdit handler signature (#15573) --- runtime/lua/vim/lsp/handlers.lua | 2 +- test/functional/plugin/lsp_spec.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index 22627c85e8..8fa6f6d024 100644 --- a/runtime/lua/vim/lsp/handlers.lua +++ b/runtime/lua/vim/lsp/handlers.lua @@ -144,7 +144,7 @@ M['textDocument/codeAction'] = function(_, result) end --see: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_applyEdit -M['workspace/applyEdit'] = function(_, _, workspace_edit) +M['workspace/applyEdit'] = function(_, workspace_edit) if not workspace_edit then return end -- TODO(ashkan) Do something more with label? if workspace_edit.label then diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua index 16fe75d359..1d790cd470 100644 --- a/test/functional/plugin/lsp_spec.lua +++ b/test/functional/plugin/lsp_spec.lua @@ -1226,7 +1226,7 @@ describe('LSP', function() label = nil; edit = {}; } - return vim.lsp.handlers['workspace/applyEdit'](nil, nil, apply_edit) + return vim.lsp.handlers['workspace/applyEdit'](nil, apply_edit) ]]) end) end)