aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin/lsp_spec.lua
diff options
context:
space:
mode:
authorfrancisco souza <fsouza@users.noreply.github.com>2020-10-25 08:17:34 -0400
committerfrancisco souza <fsouza@users.noreply.github.com>2020-10-25 08:17:34 -0400
commit1f0f92f8ec0ca94c47707cfebc9eeff561715368 (patch)
tree101417e0cde4cee41338979dd4a171c7e9363797 /test/functional/plugin/lsp_spec.lua
parent6312792d8a6a7d293661d33d440343d4cc6e0e6e (diff)
downloadrneovim-1f0f92f8ec0ca94c47707cfebc9eeff561715368.tar.gz
rneovim-1f0f92f8ec0ca94c47707cfebc9eeff561715368.tar.bz2
rneovim-1f0f92f8ec0ca94c47707cfebc9eeff561715368.zip
lsp: fix fallback for callback in method_unsupported
Missed this #12764. My bad :((
Diffstat (limited to 'test/functional/plugin/lsp_spec.lua')
-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)