Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value format #17

Open
pablomayobre opened this issue Nov 25, 2017 · 2 comments
Open

Default value format #17

pablomayobre opened this issue Nov 25, 2017 · 2 comments

Comments

@pablomayobre
Copy link
Contributor

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

@rm-code
Copy link
Owner

rm-code commented Nov 25, 2017

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?

@pablomayobre
Copy link
Contributor Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants