mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
fix(lsp): only send valid params in executeCommand (#16987)
This commit is contained in:
parent
9386fca597
commit
e41e8b3fda
@ -627,14 +627,19 @@ end
|
|||||||
|
|
||||||
--- Executes an LSP server command.
|
--- Executes an LSP server command.
|
||||||
---
|
---
|
||||||
---@param command A valid `ExecuteCommandParams` object
|
---@param command_params table A valid `ExecuteCommandParams` object
|
||||||
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand
|
---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand
|
||||||
function M.execute_command(command)
|
function M.execute_command(command_params)
|
||||||
validate {
|
validate {
|
||||||
command = { command.command, 's' },
|
command = { command_params.command, 's' },
|
||||||
arguments = { command.arguments, 't', true }
|
arguments = { command_params.arguments, 't', true }
|
||||||
}
|
}
|
||||||
request('workspace/executeCommand', command)
|
command_params = {
|
||||||
|
command=command_params.command,
|
||||||
|
arguments=command_params.arguments,
|
||||||
|
workDoneToken=command_params.workDoneToken,
|
||||||
|
}
|
||||||
|
request('workspace/executeCommand', command_params )
|
||||||
end
|
end
|
||||||
|
|
||||||
return M
|
return M
|
||||||
|
Loading…
Reference in New Issue
Block a user