aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/inlay_hint.lua
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2023-08-09 11:06:13 +0200
committerGitHub <noreply@github.com>2023-08-09 11:06:13 +0200
commitc43c745a14dced87a23227d7be4f1c33d4455193 (patch)
tree0cd5cf1cbbfa20be7fffbad696ba5ee97181847e /runtime/lua/vim/lsp/inlay_hint.lua
parent8afdc1f3867a620c8235b3d3964b019b94657190 (diff)
downloadrneovim-c43c745a14dced87a23227d7be4f1c33d4455193.tar.gz
rneovim-c43c745a14dced87a23227d7be4f1c33d4455193.tar.bz2
rneovim-c43c745a14dced87a23227d7be4f1c33d4455193.zip
fix(lua): improve annotations for stricter luals diagnostics (#24609)
Problem: luals returns stricter diagnostics with bundled luarc.json Solution: Improve some function and type annotations: * use recognized uv.* types * disable diagnostic for global `vim` in shared.lua * docs: don't start comment lines with taglink (otherwise LuaLS will interpret it as a type) * add type alias for lpeg pattern * fix return annotation for `vim.secure.trust` * rename local Range object in vim.version (shadows `Range` in vim.treesitter) * fix some "missing fields" warnings * add missing required fields for test functions in eval.lua * rename lsp meta files for consistency
Diffstat (limited to 'runtime/lua/vim/lsp/inlay_hint.lua')
-rw-r--r--runtime/lua/vim/lsp/inlay_hint.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/lsp/inlay_hint.lua b/runtime/lua/vim/lsp/inlay_hint.lua
index eb2f59b312..8407105d47 100644
--- a/runtime/lua/vim/lsp/inlay_hint.lua
+++ b/runtime/lua/vim/lsp/inlay_hint.lua
@@ -5,8 +5,8 @@ local api = vim.api
local M = {}
---@class lsp.inlay_hint.bufstate
----@field version integer
----@field client_hint table<integer, table<integer, lsp.InlayHint[]>> client_id -> (lnum -> hints)
+---@field version? integer
+---@field client_hint? table<integer, table<integer, lsp.InlayHint[]>> client_id -> (lnum -> hints)
---@field applied table<integer, integer> Last version of hints applied to this line
---@field enabled boolean Whether inlay hints are enabled for this buffer
---@type table<integer, lsp.inlay_hint.bufstate>