mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
feat(lsp): include original request params in handler ctx
This is mostly motivated by https://github.com/neovim/neovim/issues/12326 Client side commands might need to access the original request parameters. Currently this is already possible by using closures with `vim.lsp.buf_request`, but the global handlers so far couldn't access the request parameters.
This commit is contained in:
@@ -896,7 +896,7 @@ function lsp.start_client(config)
|
||||
|
||||
local _ = log.debug() and log.debug(log_prefix, "client.request", client_id, method, params, handler, bufnr)
|
||||
return rpc.request(method, params, function(err, result)
|
||||
handler(err, result, {method=method, client_id=client_id, bufnr=bufnr})
|
||||
handler(err, result, {method=method, client_id=client_id, bufnr=bufnr, params=params})
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user