mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +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
@@ -101,7 +101,7 @@ local function get_extmark_range(bufnr, extmark_id)
|
||||
return { mark[1], mark[2], mark[3].end_row, mark[3].end_col }
|
||||
end
|
||||
|
||||
--- @class vim.snippet.Tabstop
|
||||
--- @class (private) vim.snippet.Tabstop
|
||||
--- @field extmark_id integer
|
||||
--- @field bufnr integer
|
||||
--- @field index integer
|
||||
@@ -177,7 +177,7 @@ function Tabstop:set_right_gravity(right_gravity)
|
||||
})
|
||||
end
|
||||
|
||||
--- @class vim.snippet.Session
|
||||
--- @class (private) vim.snippet.Session
|
||||
--- @field bufnr integer
|
||||
--- @field extmark_id integer
|
||||
--- @field tabstops table<integer, vim.snippet.Tabstop[]>
|
||||
|
Reference in New Issue
Block a user