diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2025-02-11 03:38:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-11 03:38:07 -0800 |
commit | 891d2f4029259b2790b9aa3ca71ebca0ff3d7eba (patch) | |
tree | 136651f6825b8d530f0e607e48674368608dc5ef /runtime/lua/vim/lsp/handlers.lua | |
parent | 3abfaafad255079f39a0843fb1b601db00d739af (diff) | |
parent | e8b5dd1e89bfa984e7b943443a291484cba23fac (diff) | |
download | rneovim-891d2f4029259b2790b9aa3ca71ebca0ff3d7eba.tar.gz rneovim-891d2f4029259b2790b9aa3ca71ebca0ff3d7eba.tar.bz2 rneovim-891d2f4029259b2790b9aa3ca71ebca0ff3d7eba.zip |
Merge #30860 LSP: symbols_to_items()
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r-- | runtime/lua/vim/lsp/handlers.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua index b35140dfad..25f87a7164 100644 --- a/runtime/lua/vim/lsp/handlers.lua +++ b/runtime/lua/vim/lsp/handlers.lua @@ -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 |