From 08616571f47cc367a5fe59b52295708b9fda3b09 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 28 Dec 2021 18:15:16 +0100 Subject: chore: fix typos (#16506) Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com> Co-authored-by: Evgeni Chasnovski Co-authored-by: zeertzjq Co-authored-by: Christoph Hasse Co-authored-by: Alef Pereira Co-authored-by: AusCyber Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com> --- runtime/lua/vim/lsp/rpc.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/lua/vim/lsp/rpc.lua') diff --git a/runtime/lua/vim/lsp/rpc.lua b/runtime/lua/vim/lsp/rpc.lua index 1fb75ddeb7..1ecac50df4 100644 --- a/runtime/lua/vim/lsp/rpc.lua +++ b/runtime/lua/vim/lsp/rpc.lua @@ -133,7 +133,8 @@ local function request_parser_loop() end end -local client_errors = vim.tbl_add_reverse_lookup { +--- Mapping of error codes used by the client +local client_errors = { INVALID_SERVER_MESSAGE = 1; INVALID_SERVER_JSON = 2; NO_RESULT_CALLBACK_FOUND = 3; @@ -143,6 +144,8 @@ local client_errors = vim.tbl_add_reverse_lookup { SERVER_RESULT_CALLBACK_ERROR = 7; } +client_errors = vim.tbl_add_reverse_lookup(client_errors) + --- Constructs an error message from an LSP error object. --- ---@param err (table) The error object -- cgit