mirror of
https://github.com/neovim/neovim.git
synced 2025-10-26 12:27:24 +00:00
fix(lsp): include context for each client in multi-handler results (#34669)
This commit is contained in:
committed by
GitHub
parent
f0c0c24ed7
commit
6005bc68b2
@@ -1331,7 +1331,7 @@ end
|
||||
--- a `client_id:result` map.
|
||||
---@return function cancel Function that cancels all requests.
|
||||
function lsp.buf_request_all(bufnr, method, params, handler)
|
||||
local results = {} --- @type table<integer,{err: lsp.ResponseError?, result: any}>
|
||||
local results = {} --- @type table<integer,{err: lsp.ResponseError?, result: any, context: lsp.HandlerContext}>
|
||||
local remaining --- @type integer?
|
||||
|
||||
local _, cancel = lsp.buf_request(bufnr, method, params, function(err, result, ctx, config)
|
||||
@@ -1341,7 +1341,7 @@ function lsp.buf_request_all(bufnr, method, params, handler)
|
||||
end
|
||||
|
||||
-- The error key is deprecated and will be removed in 0.13
|
||||
results[ctx.client_id] = { err = err, error = err, result = result }
|
||||
results[ctx.client_id] = { err = err, error = err, result = result, context = ctx }
|
||||
remaining = remaining - 1
|
||||
|
||||
if remaining == 0 then
|
||||
|
||||
Reference in New Issue
Block a user