neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 6c3f7e7e27a0ffcf6d58dc1f5ad2fce7e59a2d88
parent 5a8a34dafa2aa9e11df405745008543eef644bdc
Author: TheLeoP <eugenio2305@hotmail.com>
Date:   Fri, 21 Jun 2024 14:44:40 -0500

fix(gen_vimdoc): correctly generate function fields

Diffstat:
Mscripts/luacats_parser.lua | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/scripts/luacats_parser.lua b/scripts/luacats_parser.lua @@ -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] = ': '