mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
fix(gen_vimdoc): correctly generate function fields
This commit is contained in:
parent
5a8a34dafa
commit
6c3f7e7e27
@ -253,9 +253,12 @@ end
|
||||
--- @return nvim.luacats.parser.field
|
||||
local function fun2field(fun)
|
||||
local parts = { 'fun(' }
|
||||
|
||||
local params = {} ---@type string[]
|
||||
for _, p in ipairs(fun.params or {}) do
|
||||
parts[#parts + 1] = string.format('%s: %s', p.name, p.type)
|
||||
params[#params + 1] = string.format('%s: %s', p.name, p.type)
|
||||
end
|
||||
parts[#parts + 1] = table.concat(params, ', ')
|
||||
parts[#parts + 1] = ')'
|
||||
if fun.returns then
|
||||
parts[#parts + 1] = ': '
|
||||
|
Loading…
Reference in New Issue
Block a user