aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/rpc.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-06-11 12:05:18 +0100
committerLewis Russell <me@lewisr.dev>2024-06-11 12:45:43 +0100
commit5e49ef0af3cb8dba658e5d0dc6a807f8edebf590 (patch)
tree4d819cee76851c0c3168cd6f12c7d5ea87a586be /runtime/lua/vim/lsp/rpc.lua
parentd8e384b7bfd5829e5ff5006202faa584b3211e84 (diff)
downloadrneovim-5e49ef0af3cb8dba658e5d0dc6a807f8edebf590.tar.gz
rneovim-5e49ef0af3cb8dba658e5d0dc6a807f8edebf590.tar.bz2
rneovim-5e49ef0af3cb8dba658e5d0dc6a807f8edebf590.zip
refactor(lua): improve type annotations
Diffstat (limited to 'runtime/lua/vim/lsp/rpc.lua')
-rw-r--r--runtime/lua/vim/lsp/rpc.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/rpc.lua b/runtime/lua/vim/lsp/rpc.lua
index 3c63a12da2..5e2b041a0a 100644
--- a/runtime/lua/vim/lsp/rpc.lua
+++ b/runtime/lua/vim/lsp/rpc.lua
@@ -140,7 +140,7 @@ local client_errors = {
SERVER_RESULT_CALLBACK_ERROR = 7,
}
---- @type table<string|integer, string|integer>
+--- @type table<string,integer> | table<integer,string>
--- @nodoc
M.client_errors = vim.deepcopy(client_errors)
for k, v in pairs(client_errors) do
@@ -502,7 +502,7 @@ function Client:handle_body(body)
if decoded.error then
decoded.error = setmetatable(decoded.error, {
__tostring = M.format_rpc_error,
- }) --- @type table
+ })
end
self:try_call(
M.client_errors.SERVER_RESULT_CALLBACK_ERROR,