feat(lsp): add per-client commands (#16101)

This commit is contained in:
Michael Lingelbach
2021-11-01 03:14:59 -07:00
committed by GitHub
parent 7ae86c1d4c
commit 519d8deb08
6 changed files with 79 additions and 32 deletions

View File

@@ -480,7 +480,7 @@ local function on_code_action_results(results, ctx)
end
if action.command then
local command = type(action.command) == 'table' and action.command or action
local fn = vim.lsp.commands[command.command]
local fn = client.commands[command.command] or vim.lsp.commands[command.command]
if fn then
local enriched_ctx = vim.deepcopy(ctx)
enriched_ctx.client_id = client.id