aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
authorRaphael <glepnir@neovim.pro>2023-06-23 19:54:47 +0800
committerGitHub <noreply@github.com>2023-06-23 04:54:47 -0700
commit4dc86477b674d056b137a3afafd8824f7b7717ec (patch)
tree2eb2d45e4184b2d894cb9bc4c99ed1f1d85cee79 /runtime/lua/vim/lsp.lua
parent94a904b453e5fe5b2cb098828c093e34246d4125 (diff)
downloadrneovim-4dc86477b674d056b137a3afafd8824f7b7717ec.tar.gz
rneovim-4dc86477b674d056b137a3afafd8824f7b7717ec.tar.bz2
rneovim-4dc86477b674d056b137a3afafd8824f7b7717ec.zip
build(luarc.json): disable luadoc-miss-see-name #24108
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua4
1 files changed, 2 insertions, 2 deletions
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