aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/buf.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-12-13 12:00:11 +0000
committerLewis Russell <me@lewisr.dev>2023-12-14 12:39:18 +0000
commit97bea3163a3fe50359e7f6ffda747e28974a818a (patch)
treedd369da0134c8d08596f7b80931642c28580d47d /runtime/lua/vim/lsp/buf.lua
parent320e9c1c21817fd76b84345018661f70437fa4b5 (diff)
downloadrneovim-97bea3163a3fe50359e7f6ffda747e28974a818a.tar.gz
rneovim-97bea3163a3fe50359e7f6ffda747e28974a818a.tar.bz2
rneovim-97bea3163a3fe50359e7f6ffda747e28974a818a.zip
feat(lsp): more annotations
Diffstat (limited to 'runtime/lua/vim/lsp/buf.lua')
-rw-r--r--runtime/lua/vim/lsp/buf.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp/buf.lua b/runtime/lua/vim/lsp/buf.lua
index cf9acc0808..2f754444e9 100644
--- a/runtime/lua/vim/lsp/buf.lua
+++ b/runtime/lua/vim/lsp/buf.lua
@@ -49,7 +49,7 @@ local function request_with_options(name, params, options)
local req_handler
if options then
req_handler = function(err, result, ctx, config)
- local client = vim.lsp.get_client_by_id(ctx.client_id)
+ local client = assert(vim.lsp.get_client_by_id(ctx.client_id))
local handler = client.handlers[name] or vim.lsp.handlers[name]
handler(err, result, ctx, vim.tbl_extend('force', config or {}, options))
end
@@ -299,12 +299,12 @@ function M.rename(new_name, options)
)[1]
end
- local try_use_client
- try_use_client = function(idx, client)
+ local function try_use_client(idx, client)
if not client then
return
end
+ --- @param name string
local function rename(name)
local params = util.make_position_params(win, client.offset_encoding)
params.newName = name