docs(annotations): added ---@generic support

This commit is contained in:
Colin Kennedy
2024-12-11 01:01:14 -08:00
committed by Lewis Russell
parent 65b1733405
commit f9dd682621
4 changed files with 55 additions and 31 deletions

View File

@@ -496,6 +496,10 @@ local function render_eval_meta(f, fun, write)
end
end
for _, text in ipairs(vim.fn.reverse(fun.generics or {})) do
write(fmt('--- @generic %s', text))
end
local req_args = type(fun.args) == 'table' and fun.args[1] or fun.args or 0
for i, param in ipairs(params) do