diff options
author | Mathias Fußenegger <mfussenegger@users.noreply.github.com> | 2022-06-05 16:43:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-05 16:43:32 +0200 |
commit | e4df1c9b9e61e79234684d30ca700b42f82bc34a (patch) | |
tree | fc369803d77a91e530b74ccc9eb0c08501c2b5c9 /runtime/lua/vim/lsp/buf.lua | |
parent | 214f866fe50737152f87ec04824f5e0f1d39edc2 (diff) | |
download | rneovim-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 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r-- | runtime/lua/vim/lsp/buf.lua | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua index 0b2e1c9b8d..fa8ee23805 100644 --- a/runtime/lua/vim/lsp/buf.lua +++ b/runtime/lua/vim/lsp/buf.lua @@ -752,7 +752,14 @@ local function on_code_action_results(results, ctx, options) enriched_ctx.client_id = client.id fn(command, enriched_ctx) else - M.execute_command(command) + -- Not using command directly to exclude extra properties, + -- see https://github.com/python-lsp/python-lsp-server/issues/146 + local params = { + command = command.command, + arguments = command.arguments, + workDoneToken = command.workDoneToken, + } + client.request('workspace/executeCommand', params, nil, ctx.bufnr) end end end |