mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
docs: add lua typing for vim.NIL
This commit is contained in:
committed by
Lewis Russell
parent
965dbd0e01
commit
4d91604c88
@@ -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.
|
||||
|
||||
2
runtime/lua/vim/_meta/vvars.lua
generated
2
runtime/lua/vim/_meta/vvars.lua
generated
@@ -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.
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user