mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +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
@@ -412,6 +412,7 @@ M[ms.textDocument_hover] = M.hover
|
||||
---@param _ nil not used
|
||||
---@param result (table) result of LSP method; a location or a list of locations.
|
||||
---@param ctx (lsp.HandlerContext) table containing the context of the request, including the method
|
||||
---@param config? vim.lsp.buf.LocationOpts
|
||||
---(`textDocument/definition` can return `Location` or `Location[]`
|
||||
local function location_handler(_, result, ctx, config)
|
||||
if result == nil or vim.tbl_isempty(result) then
|
||||
|
||||
Reference in New Issue
Block a user