lsp encoding default value

serverCapcities
ray-x 2 years ago
parent ab4daceede
commit 31f2f920e1

@ -380,11 +380,12 @@ function M.empty(t)
end
function M.encoding(client)
if type(client) ~= 'table' then
if client == nil then
client = 1
end
client = vim.lsp.get_client_by_id(client)
if client == nil then
client = 1
end
if type(client) == 'number' then
client = vim.lsp.get_client_by_id(client) or {}
end
local oe = client.offset_encoding
if oe == nil then

Loading…
Cancel
Save