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
@@ -21,6 +21,7 @@ error('Cannot require a meta file')
|
||||
|
||||
vim.lpeg = {}
|
||||
|
||||
--- @nodoc
|
||||
--- @class vim.lpeg.Pattern
|
||||
--- @operator unm: vim.lpeg.Pattern
|
||||
--- @operator add(vim.lpeg.Pattern): vim.lpeg.Pattern
|
||||
@@ -167,6 +168,7 @@ function vim.lpeg.S(string) end
|
||||
--- @return vim.lpeg.Pattern
|
||||
function vim.lpeg.V(v) end
|
||||
|
||||
--- @nodoc
|
||||
--- @class vim.lpeg.Locale
|
||||
--- @field alnum userdata
|
||||
--- @field alpha userdata
|
||||
|
Reference in New Issue
Block a user