aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/handlers.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-02-27 15:20:32 +0000
committerLewis Russell <me@lewisr.dev>2024-03-01 23:02:18 +0000
commita5fe8f59d98398d04bed8586cee73864bbcdde92 (patch)
tree9dd8086edc1e572ba1fddd03df17918dcd76a72e /runtime/lua/vim/lsp/handlers.lua
parent813dd36b72979dfd05479eb6402b9becc0faea29 (diff)
downloadrneovim-a5fe8f59d98398d04bed8586cee73864bbcdde92.tar.gz
rneovim-a5fe8f59d98398d04bed8586cee73864bbcdde92.tar.bz2
rneovim-a5fe8f59d98398d04bed8586cee73864bbcdde92.zip
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.
Diffstat (limited to 'runtime/lua/vim/lsp/handlers.lua')
-rw-r--r--runtime/lua/vim/lsp/handlers.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/handlers.lua b/runtime/lua/vim/lsp/handlers.lua
index 781d720486..d816fb1482 100644
--- a/runtime/lua/vim/lsp/handlers.lua
+++ b/runtime/lua/vim/lsp/handlers.lua
@@ -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