mirror of
https://github.com/neovim/neovim.git
synced 2026-05-01 11:34:56 +00:00
feat(lsp)!: symbol_to_item requires offset_encoding
This commit is contained in:
@@ -231,7 +231,7 @@ end
|
||||
---
|
||||
--- The returned function has an optional {config} parameter that accepts |vim.lsp.ListOpts|
|
||||
---
|
||||
---@param map_result fun(resp, bufnr: integer): table to convert the response
|
||||
---@param map_result fun(resp, bufnr: integer, position_encoding: 'utf-8'|'utf-16'|'utf-32'): table to convert the response
|
||||
---@param entity string name of the resource used in a `not found` error message
|
||||
---@param title_fn fun(ctx: lsp.HandlerContext): string Function to call to generate list title
|
||||
---@return lsp.Handler
|
||||
@@ -244,7 +244,8 @@ local function response_to_list(map_result, entity, title_fn)
|
||||
end
|
||||
config = config or {}
|
||||
local title = title_fn(ctx)
|
||||
local items = map_result(result, ctx.bufnr)
|
||||
local client = assert(vim.lsp.get_client_by_id(ctx.client_id))
|
||||
local items = map_result(result, ctx.bufnr, client.offset_encoding)
|
||||
|
||||
local list = { title = title, items = items, context = ctx }
|
||||
if config.on_list then
|
||||
|
||||
Reference in New Issue
Block a user