mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
docs(lsp): vim.api.buf_request_sync
can also take function as params
#33170
This commit is contained in:

committed by
GitHub

parent
49756ebc70
commit
de96063bda
@@ -789,7 +789,10 @@ buf_request_sync({bufnr}, {method}, {params}, {timeout_ms})
|
||||
Parameters: ~
|
||||
• {bufnr} (`integer`) Buffer handle, or 0 for current.
|
||||
• {method} (`string`) LSP method name
|
||||
• {params} (`table?`) Parameters to send to the server
|
||||
• {params} (`table|(fun(client: vim.lsp.Client, bufnr: integer): table?)?`)
|
||||
Parameters to send to the server. Can also be passed as
|
||||
a function that returns the params table for cases where
|
||||
parameters are specific to the client.
|
||||
• {timeout_ms} (`integer?`, default: `1000`) Maximum time in
|
||||
milliseconds to wait for a result.
|
||||
|
||||
|
@@ -1230,7 +1230,9 @@ end
|
||||
---
|
||||
---@param bufnr integer Buffer handle, or 0 for current.
|
||||
---@param method string LSP method name
|
||||
---@param params table? Parameters to send to the server
|
||||
---@param params? table|(fun(client: vim.lsp.Client, bufnr: integer): table?) Parameters to send to the server.
|
||||
--- Can also be passed as a function that returns the params table for cases where
|
||||
--- parameters are specific to the client.
|
||||
---@param timeout_ms integer? Maximum time in milliseconds to wait for a result.
|
||||
--- (default: `1000`)
|
||||
---@return table<integer, {error: lsp.ResponseError?, result: any}>? result Map of client_id:request_result.
|
||||
|
Reference in New Issue
Block a user