diff options
author | Lewis Russell <lewis6991@gmail.com> | 2024-03-05 12:06:15 +0000 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-03-05 13:36:46 +0000 |
commit | a4290f462ed7dc81e17b09bd27877b106b24b6bd (patch) | |
tree | ab880e80f92fe337ff4581eba2454bb4b882375a /runtime/lua/vim/lsp.lua | |
parent | 5b312cd5f67646005312d2ebb2ef0d1bc584dcff (diff) | |
download | rneovim-a4290f462ed7dc81e17b09bd27877b106b24b6bd.tar.gz rneovim-a4290f462ed7dc81e17b09bd27877b106b24b6bd.tar.bz2 rneovim-a4290f462ed7dc81e17b09bd27877b106b24b6bd.zip |
docs(lua): improvements for LSP and Diagnostic
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r-- | runtime/lua/vim/lsp.lua | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 8ebf4de3cb..ef5d9d7cff 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -961,16 +961,15 @@ end --- --- Calls |vim.lsp.buf_request_all()| but blocks Nvim while awaiting the result. --- Parameters are the same as |vim.lsp.buf_request_all()| but the result is ---- different. Waits a maximum of {timeout_ms} (default 1000) ms. +--- different. Waits a maximum of {timeout_ms}. --- ----@param bufnr (integer) Buffer handle, or 0 for current. ----@param method (string) LSP method name ----@param params (table|nil) Parameters to send to the server ----@param timeout_ms (integer|nil) Maximum time in milliseconds to wait for a ---- result. Defaults to 1000 ---- ----@return table<integer, {err: lsp.ResponseError, result: any}>|nil (table) result Map of client_id:request_result. ----@return string|nil err On timeout, cancel, or error, `err` is a string describing the failure reason, and `result` is nil. +---@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 timeout_ms integer? Maximum time in milliseconds to wait for a result. +--- (default: `1000`) +---@return table<integer, {err: lsp.ResponseError, result: any}>? result Map of client_id:request_result. +---@return string? err On timeout, cancel, or error, `err` is a string describing the failure reason, and `result` is nil. function lsp.buf_request_sync(bufnr, method, params, timeout_ms) local request_results |