mirror of
https://github.com/neovim/neovim.git
synced 2025-11-21 09:36:29 +00:00
feat(lsp): deprecate execute_command with client:exec_cmd
This commit is contained in:
committed by
Lewis Russell
parent
39d79efa1e
commit
7a7747f1e4
@@ -881,7 +881,8 @@ local function on_code_action_results(results, opts)
|
||||
local a_cmd = action.command
|
||||
if a_cmd then
|
||||
local command = type(a_cmd) == 'table' and a_cmd or action
|
||||
client:_exec_cmd(command, ctx)
|
||||
--- @cast command lsp.Command
|
||||
client:exec_cmd(command, ctx)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1037,12 +1038,14 @@ function M.code_action(opts)
|
||||
end
|
||||
end
|
||||
|
||||
--- @deprecated
|
||||
--- Executes an LSP server command.
|
||||
--- @param command_params lsp.ExecuteCommandParams
|
||||
--- @see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#workspace_executeCommand
|
||||
function M.execute_command(command_params)
|
||||
validate('command', command_params.command, 'string')
|
||||
validate('arguments', command_params.arguments, 'table', true)
|
||||
vim.deprecate('execute_command', 'client:exec_cmd', '0.12')
|
||||
command_params = {
|
||||
command = command_params.command,
|
||||
arguments = command_params.arguments,
|
||||
|
||||
Reference in New Issue
Block a user