aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorMatthieu Coudron <mattator@gmail.com>2020-10-25 22:09:41 +0100
committerGitHub <noreply@github.com>2020-10-25 22:09:41 +0100
commita22fe09b90a52f451d9fd8d3372b8c390dd1dc1a (patch)
tree13387c62ee5181a845dead8d9d11ab3048fc52e5 /test/functional
parent4ba5b4a8646106252531610c46afffc3b021efcd (diff)
parent1f0f92f8ec0ca94c47707cfebc9eeff561715368 (diff)
downloadrneovim-a22fe09b90a52f451d9fd8d3372b8c390dd1dc1a.tar.gz
rneovim-a22fe09b90a52f451d9fd8d3372b8c390dd1dc1a.tar.bz2
rneovim-a22fe09b90a52f451d9fd8d3372b8c390dd1dc1a.zip
Merge pull request #13154 from fsouza/fix-callback-logic
[RDY] lsp: fix fallback for callback in method_unsupported
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/plugin/lsp_spec.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 067a13ce68..73f3fe5d0c 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -323,6 +323,9 @@ describe('LSP', function()
test_name = "capabilities_for_client_supports_method";
on_setup = function()
exec_lua([=[
+ vim.lsp.callbacks['textDocument/hover'] = function(err, method)
+ vim.lsp._last_lsp_callback = { err = err; method = method }
+ end
vim.lsp._unsupported_method = function(method)
vim.lsp._last_unsupported_method = method
return 'fake-error'
@@ -334,6 +337,9 @@ describe('LSP', function()
client.stop()
local method = exec_lua("return vim.lsp._last_unsupported_method")
eq("textDocument/hover", method)
+ local lsp_cb_call = exec_lua("return vim.lsp._last_lsp_callback")
+ eq("fake-error", lsp_cb_call.err)
+ eq("textDocument/hover", lsp_cb_call.method)
end;
on_exit = function(code, signal)
eq(0, code, "exit code", fake_lsp_logfile)