diff options
author | notomo <notomo.motono@gmail.com> | 2023-01-04 20:48:41 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 11:48:41 +0000 |
commit | e35b9020b16985eee26e942f9a3f6b045bc3809b (patch) | |
tree | 0a685e4fccb55380017e059243db0570a83954cb /runtime/lua/vim/lsp/util.lua | |
parent | ef18c9f9b05caf1f39ed32762f53802e378f143b (diff) | |
download | rneovim-e35b9020b16985eee26e942f9a3f6b045bc3809b.tar.gz rneovim-e35b9020b16985eee26e942f9a3f6b045bc3809b.tar.bz2 rneovim-e35b9020b16985eee26e942f9a3f6b045bc3809b.zip |
docs(lua): adjust some type annotations
Diffstat (limited to 'runtime/lua/vim/lsp/util.lua')
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index 2bd15c87d9..2c6ba823db 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -1077,7 +1077,7 @@ end --- ---@param location table (`Location`|`LocationLink`) ---@param offset_encoding "utf-8" | "utf-16" | "utf-32" ----@param opts table options +---@param opts table|nil options --- - reuse_win (boolean) Jump to existing window if buffer is already open. --- - focus (boolean) Whether to focus/jump to location if possible. Defaults to true. ---@return boolean `true` if succeeded @@ -1134,7 +1134,7 @@ end --- ---@param location table (`Location`|`LocationLink`) ---@param offset_encoding "utf-8" | "utf-16" | "utf-32" ----@param reuse_win boolean Jump to existing window if buffer is already open. +---@param reuse_win boolean|nil Jump to existing window if buffer is already open. ---@return boolean `true` if the jump succeeded function M.jump_to_location(location, offset_encoding, reuse_win) if offset_encoding == nil then @@ -1908,7 +1908,7 @@ end --- Creates a `TextDocumentPositionParams` object for the current buffer and cursor position. --- ---@param window number|nil: window handle or 0 for current, defaults to current ----@param offset_encoding string utf-8|utf-16|utf-32|nil defaults to `offset_encoding` of first client of buffer of `window` +---@param offset_encoding string|nil utf-8|utf-16|utf-32|nil defaults to `offset_encoding` of first client of buffer of `window` ---@returns `TextDocumentPositionParams` object ---@see https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocumentPositionParams function M.make_position_params(window, offset_encoding) |