From 4dc86477b674d056b137a3afafd8824f7b7717ec Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 23 Jun 2023 19:54:47 +0800 Subject: [PATCH] build(luarc.json): disable luadoc-miss-see-name #24108 --- contrib/luarc.json | 3 +++ runtime/lua/vim/lsp.lua | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/luarc.json b/contrib/luarc.json index ebad0581b9..31126e4215 100644 --- a/contrib/luarc.json +++ b/contrib/luarc.json @@ -13,6 +13,9 @@ "teardown", "finally", "lfs" + ], + "disable": [ + "luadoc-miss-see-name" ] }, "workspace": { diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 970bb56478..2c115007de 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -1183,7 +1183,7 @@ function lsp.start_client(config) --- ---@param code (integer) Error code ---@param err (...) Other arguments may be passed depending on the error kind - ---@see `vim.lsp.rpc.client_errors` for possible errors. Use + ---@see vim.lsp.rpc.client_errors for possible errors. Use ---`vim.lsp.rpc.client_errors[code]` to get a human-friendly name. function dispatch.on_error(code, err) if log.error() then @@ -2366,7 +2366,7 @@ function lsp.formatexpr(opts) } local response = client.request_sync('textDocument/rangeFormatting', params, timeout_ms, bufnr) - if response.result then + if response and response.result then lsp.util.apply_text_edits(response.result, 0, client.offset_encoding) return 0 end