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

There is no standard lua formatter #2

Open
Alloyed opened this issue Sep 5, 2017 · 6 comments
Open

There is no standard lua formatter #2

Alloyed opened this issue Sep 5, 2017 · 6 comments

Comments

@Alloyed
Copy link
Owner

Alloyed commented Sep 5, 2017

🤔

I'm not willing to write my own but it's interesting that it doesn't exist to begin with
prior art:
https://github.com/trixnz/lua-fmt
written by the vscode server author
https://github.com/trixnz/vscode-lua

@ryanplusplus
Copy link

Most formatters I've encountered have used the Metalua-based formatter:

I've never found the upstream source for this formatter, but I haven't searched a whole lot. As far as I can tell the source is just copy-pasted around.

Although widely used, this formatter does choke on Lua 5.3's new bitwise operators because it's based on Lua 5.1.

@Alloyed
Copy link
Owner Author

Alloyed commented Sep 14, 2017

Thanks, the parser I'm using implements a subset of metalua so I can probably just retrofit this onto its output.

the EPL suggest that it started in eclipse, and it even includes a CLI interface (!) I might leave that in there so if somebody just wants a standalone formatter they can install my package and call it from there

@ryanplusplus
Copy link

👍

@shuxiao9058
Copy link

@Alloyed
Copy link
Owner Author

Alloyed commented Mar 23, 2019

@lblasc
Copy link

lblasc commented Apr 4, 2021

https://github.com/JohnnyMorganz/StyLua

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

4 participants