aboutsummaryrefslogtreecommitdiff
path: root/test/functional/fixtures/fake-lsp-server.lua
diff options
context:
space:
mode:
authorMathias Fußenegger <mfussenegger@users.noreply.github.com>2022-06-05 16:43:32 +0200
committerGitHub <noreply@github.com>2022-06-05 16:43:32 +0200
commite4df1c9b9e61e79234684d30ca700b42f82bc34a (patch)
treefc369803d77a91e530b74ccc9eb0c08501c2b5c9 /test/functional/fixtures/fake-lsp-server.lua
parent214f866fe50737152f87ec04824f5e0f1d39edc2 (diff)
downloadrneovim-e4df1c9b9e61e79234684d30ca700b42f82bc34a.tar.gz
rneovim-e4df1c9b9e61e79234684d30ca700b42f82bc34a.tar.bz2
rneovim-e4df1c9b9e61e79234684d30ca700b42f82bc34a.zip
fix(lsp): fix multi client handling in code action (#18869)
Fixes https://github.com/neovim/neovim/issues/18860
Diffstat (limited to 'test/functional/fixtures/fake-lsp-server.lua')
-rw-r--r--test/functional/fixtures/fake-lsp-server.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/functional/fixtures/fake-lsp-server.lua b/test/functional/fixtures/fake-lsp-server.lua
index 9bceb612a5..0dc0c8c2db 100644
--- a/test/functional/fixtures/fake-lsp-server.lua
+++ b/test/functional/fixtures/fake-lsp-server.lua
@@ -757,6 +757,35 @@ function tests.code_action_with_resolve()
}
end
+function tests.code_action_server_side_command()
+ skeleton({
+ on_init = function()
+ return {
+ capabilities = {
+ codeActionProvider = {
+ resolveProvider = false,
+ },
+ },
+ }
+ end,
+ body = function()
+ notify('start')
+ local cmd = {
+ title = 'Command 1',
+ command = 'dummy1',
+ }
+ expect_request('textDocument/codeAction', function()
+ return nil, { cmd }
+ end)
+ expect_request('workspace/executeCommand', function()
+ return nil, cmd
+ end)
+ notify('shutdown')
+ end,
+ })
+end
+
+
function tests.code_action_filter()
skeleton {
on_init = function()