mirror of
https://github.com/neovim/neovim.git
synced 2025-10-21 09:12:07 +00:00
docs: improve/add documentation of Lua types
- Added `@inlinedoc` so single use Lua types can be inlined into the functions docs. E.g. ```lua --- @class myopts --- @inlinedoc --- --- Documentation for some field --- @field somefield integer --- @param opts myOpts function foo(opts) end ``` Will be rendered as ``` foo(opts) Parameters: - {opts} (table) Object with the fields: - somefield (integer) Documentation for some field ``` - Marked many classes with with `@nodoc` or `(private)`. We can eventually introduce these when we want to.
This commit is contained in:

committed by
Lewis Russell

parent
813dd36b72
commit
a5fe8f59d9
@@ -190,6 +190,7 @@ function vim._os_proc_children(ppid)
|
||||
return children
|
||||
end
|
||||
|
||||
--- @nodoc
|
||||
--- @class vim.inspect.Opts
|
||||
--- @field depth? integer
|
||||
--- @field newline? string
|
||||
@@ -454,7 +455,7 @@ vim.cmd = setmetatable({}, {
|
||||
end,
|
||||
})
|
||||
|
||||
--- @class vim.var_accessor
|
||||
--- @class (private) vim.var_accessor
|
||||
--- @field [string] any
|
||||
--- @field [integer] vim.var_accessor
|
||||
|
||||
@@ -1048,7 +1049,7 @@ function vim.deprecate(name, alternative, version, plugin, backtrace)
|
||||
-- e.g., when planned to be removed in version = '0.12' (soft-deprecated since 0.10-dev),
|
||||
-- show warnings since 0.11, including 0.11-dev (hard_deprecated_since = 0.11-dev).
|
||||
if plugin == 'Nvim' then
|
||||
local current_version = vim.version() ---@type Version
|
||||
local current_version = vim.version() ---@type vim.Version
|
||||
local removal_version = assert(vim.version.parse(version))
|
||||
local is_hard_deprecated ---@type boolean
|
||||
|
||||
|
Reference in New Issue
Block a user