fix(lsp): lint warnings, default offset_encoding #24046

- fix lint / analysis warnings
- locations_to_items(): get default offset_encoding from active client
- character_offset(): get default offset_encoding from active client
This commit is contained in:
Raphael
2023-07-01 18:42:37 +08:00
committed by GitHub
parent 11844dde81
commit ba8f19ebb6
7 changed files with 130 additions and 113 deletions

View File

@ -33,11 +33,9 @@ local function execute_lens(lens, bufnr, client_id)
local client = vim.lsp.get_client_by_id(client_id)
assert(client, 'Client is required to execute lens, client_id=' .. client_id)
client._exec_cmd(lens.command, { bufnr = bufnr }, function(...)
local result = vim.lsp.handlers['workspace/executeCommand'](...)
vim.lsp.handlers['workspace/executeCommand'](...)
M.refresh()
return result
end)
end