diff options
author | Jongwook Choi <wookayin@gmail.com> | 2024-01-14 22:37:07 -0500 |
---|---|---|
committer | Lewis Russell <me@lewisr.dev> | 2024-01-15 08:45:30 +0000 |
commit | 4d91604c8868b7afaf429cc16b72192ce89ea698 (patch) | |
tree | df5b9ffcfabab4dec53c8ec5563a2d01778aa57f /runtime/lua/vim | |
parent | 965dbd0e019ab2e2d7db1af57f406d7cf57716d7 (diff) | |
download | rneovim-4d91604c8868b7afaf429cc16b72192ce89ea698.tar.gz rneovim-4d91604c8868b7afaf429cc16b72192ce89ea698.tar.bz2 rneovim-4d91604c8868b7afaf429cc16b72192ce89ea698.zip |
docs: add lua typing for `vim.NIL`
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/_meta/builtin.lua | 9 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/vvars.lua | 2 | ||||
-rw-r--r-- | runtime/lua/vim/lsp/util.lua | 2 |
3 files changed, 10 insertions, 3 deletions
diff --git a/runtime/lua/vim/_meta/builtin.lua b/runtime/lua/vim/_meta/builtin.lua index eeba356672..dd849e5247 100644 --- a/runtime/lua/vim/_meta/builtin.lua +++ b/runtime/lua/vim/_meta/builtin.lua @@ -1,7 +1,8 @@ ---@meta - -- luacheck: no unused args +error('Cannot require a meta file') + ---@defgroup vim.builtin --- ---@brief <pre>help @@ -62,6 +63,12 @@ --- ---</pre> +---@class vim.NIL + +---@type vim.NIL +---@nodoc +vim.NIL = ... + --- Returns true if the code is executing as part of a "fast" event handler, --- where most of the API is disabled. These are low-level events (e.g. --- |lua-loop-callbacks|) which can be invoked whenever Nvim polls for input. diff --git a/runtime/lua/vim/_meta/vvars.lua b/runtime/lua/vim/_meta/vvars.lua index ca87fb9d15..958b4a7ccd 100644 --- a/runtime/lua/vim/_meta/vvars.lua +++ b/runtime/lua/vim/_meta/vvars.lua @@ -427,7 +427,7 @@ vim.v.msgpack_types = ... --- In some places `v:null` can be used for a List, Dict, etc. --- that is not set. That is slightly different than an empty --- List, Dict, etc. ---- @type any +--- @type vim.NIL vim.v.null = ... --- Maximum value of a number. diff --git a/runtime/lua/vim/lsp/util.lua b/runtime/lua/vim/lsp/util.lua index a2cc81781a..50890e37ce 100644 --- a/runtime/lua/vim/lsp/util.lua +++ b/runtime/lua/vim/lsp/util.lua @@ -2139,7 +2139,7 @@ end --- ---@param settings table language server settings ---@param section string indicating the field of the settings table ----@return table|string The value of settings accessed via section +---@return table|string|vim.NIL The value of settings accessed via section. `vim.NIL` if not found. function M.lookup_section(settings, section) for part in vim.gsplit(section, '.', { plain = true }) do settings = settings[part] |