mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	fix(gen_vimdoc): correctly generate function fields
This commit is contained in:
		| @@ -253,9 +253,12 @@ end | |||||||
| --- @return nvim.luacats.parser.field | --- @return nvim.luacats.parser.field | ||||||
| local function fun2field(fun) | local function fun2field(fun) | ||||||
|   local parts = { 'fun(' } |   local parts = { 'fun(' } | ||||||
|  |  | ||||||
|  |   local params = {} ---@type string[] | ||||||
|   for _, p in ipairs(fun.params or {}) do |   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 |   end | ||||||
|  |   parts[#parts + 1] = table.concat(params, ', ') | ||||||
|   parts[#parts + 1] = ')' |   parts[#parts + 1] = ')' | ||||||
|   if fun.returns then |   if fun.returns then | ||||||
|     parts[#parts + 1] = ': ' |     parts[#parts + 1] = ': ' | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 TheLeoP
					TheLeoP