love-atom icon indicating copy to clipboard operation
love-atom copied to clipboard

Default value format

Open pablomayobre opened this issue 6 years ago • 2 comments

This is a feature request, which would be fairly easy to add to this package.

Changing line 50 in the generator to

arguments[#arguments].displayName = string.format( '[%s=%s]', v.name, v.default )

This would autocomplete functions like:

love.graphics.printf(string,x, y, [align=left], [r=0], [sx=1], [sy=sx], [ox=0], [oy=0], [kx=0], [ky=0])

Note that the argument list can become quite long, so this should be carefully considered

pablomayobre avatar Nov 25 '17 18:11 pablomayobre

Hm that could be an issue, but the length wouldn't be a problem as soon as the line is pasted to the editor, right?

rm-code avatar Nov 25 '17 19:11 rm-code

When the autocomplete is performed it becomes:

love.graphics.printf(string,x, y, align, r, sx, sy, ox, oy, kx, ky)

This is autocomplete-lua behaviour (argDisplay is only used in the autocomplete tooltip)

pablomayobre avatar Nov 25 '17 19:11 pablomayobre