aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-03-25 19:06:28 +0000
committerLewis Russell <me@lewisr.dev>2024-03-25 21:09:57 +0000
commita7bbda121d035d050b449b4dc63bd6ae027e248d (patch)
treefb31bb2003624b57aee5a0b740822d8b8ca76e5a /runtime
parent3fd8292aaf215a17c3803ed84bc3b9dfd4931294 (diff)
downloadrneovim-a7bbda121d035d050b449b4dc63bd6ae027e248d.tar.gz
rneovim-a7bbda121d035d050b449b4dc63bd6ae027e248d.tar.bz2
rneovim-a7bbda121d035d050b449b4dc63bd6ae027e248d.zip
fix(test): typing
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/lsp.txt2
-rw-r--r--runtime/lua/vim/lsp/client.lua10
2 files changed, 6 insertions, 6 deletions
diff --git a/runtime/doc/lsp.txt b/runtime/doc/lsp.txt
index ed5e3b63f9..08fdf50f5b 100644
--- a/runtime/doc/lsp.txt
+++ b/runtime/doc/lsp.txt
@@ -1016,7 +1016,7 @@ Lua module: vim.lsp.client *lsp-client*
• {capabilities} (`lsp.ClientCapabilities`) The capabilities
provided by the client (editor or tool)
• {dynamic_capabilities} (`lsp.DynamicCapabilities`)
- • {request} (`fun(method: string, params: table?, handler: lsp.Handler?, bufnr: integer): boolean, integer?`)
+ • {request} (`fun(method: string, params: table?, handler: lsp.Handler?, bufnr: integer?): boolean, integer?`)
Sends a request to the server. This is a thin
wrapper around {client.rpc.request} with some
additional checking. If {handler} is not
diff --git a/runtime/lua/vim/lsp/client.lua b/runtime/lua/vim/lsp/client.lua
index b06fab7319..1259a2f3d1 100644
--- a/runtime/lua/vim/lsp/client.lua
+++ b/runtime/lua/vim/lsp/client.lua
@@ -225,7 +225,7 @@ local validate = vim.validate
--- If {status} is `true`, the function returns {request_id} as the second
--- result. You can use this with `client.cancel_request(request_id)` to cancel
--- the request.
---- @field request fun(method: string, params: table?, handler: lsp.Handler?, bufnr: integer): boolean, integer?
+--- @field request fun(method: string, params: table?, handler: lsp.Handler?, bufnr: integer?): boolean, integer?
---
--- Sends a request to the server and synchronously waits for the response.
--- This is a wrapper around {client.request}
@@ -647,10 +647,10 @@ end
--- checks for capabilities and handler availability.
---
--- @param method string LSP method name.
---- @param params table|nil LSP request params.
---- @param handler lsp.Handler|nil Response |lsp-handler| for this method.
---- @param bufnr integer Buffer handle (0 for current).
---- @return boolean status, integer|nil request_id {status} is a bool indicating
+--- @param params? table LSP request params.
+--- @param handler? lsp.Handler Response |lsp-handler| for this method.
+--- @param bufnr? integer Buffer handle (0 for current).
+--- @return boolean status, integer? request_id {status} is a bool indicating
--- whether the request was successful. If it is `false`, then it will
--- always be `false` (the client has shutdown). If it was
--- successful, then it will return {request_id} as the