aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp_spec.lua
diff options
context:
space:
mode:
authorMathias Fussenegger <f.mathias@zignar.net>2021-03-11 23:49:59 +0100
committerMathias Fussenegger <f.mathias@zignar.net>2021-09-20 22:06:54 +0200
commit187579fe197ddd844bc0b0979e7f53c646f4235e (patch)
tree1cf1d88140a81ac2a01e85840760776e008cfe4d /test/functional/plugin/lsp_spec.lua
parent0216aed20c9f5960506155e3d722f5ee5e807720 (diff)
downloadrneovim-187579fe197ddd844bc0b0979e7f53c646f4235e.tar.gz
rneovim-187579fe197ddd844bc0b0979e7f53c646f4235e.tar.bz2
rneovim-187579fe197ddd844bc0b0979e7f53c646f4235e.zip
feat(lsp): include original request params in handler ctx
This is mostly motivated by https://github.com/neovim/neovim/issues/12326 Client side commands might need to access the original request parameters. Currently this is already possible by using closures with `vim.lsp.buf_request`, but the global handlers so far couldn't access the request parameters.
Diffstat (limited to 'test/functional/plugin/lsp_spec.lua')
-rw-r--r--test/functional/plugin/lsp_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 6ad37110c7..7319a02533 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -2353,6 +2353,10 @@ describe('LSP', function()
eq(0, signal, "exit signal", fake_lsp_logfile)
end;
on_handler = function(err, result, ctx)
+ -- Don't compare & assert params, they're not relevant for the testcase
+ -- This allows us to be lazy and avoid declaring them
+ ctx.params = nil
+
eq(table.remove(test.expected_handlers), {err, result, ctx}, "expected handler")
if ctx.method == 'start' then
exec_lua("vim.lsp.buf.rename()")