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

Luau: Implement proper IfExpression formatting #335

Merged
merged 13 commits into from Jan 17, 2022
Merged

Conversation

JohnnyMorganz
Copy link
Owner

@JohnnyMorganz JohnnyMorganz commented Jan 6, 2022

We format fully on a single line, then determine if it fits nicely
If not, we then expand it out

Closes #289 and Fixes #321

Available to test via

cargo install --git https://github.com/JohnnyMorganz/StyLua.git --branch ifexpression

@JohnnyMorganz JohnnyMorganz marked this pull request as ready for review January 10, 2022 13:43
@JohnnyMorganz
Copy link
Owner Author

I think the implementation for this is complete. Tested it on the codebases I have, they don't have a lot of if-expression syntax but for everything they do have, it seems to be formatting well.

I'll wait a while to see if others have anything they would like to bring up before merging this in

@JohnnyMorganz JohnnyMorganz merged commit c57c751 into master Jan 17, 2022
@JohnnyMorganz JohnnyMorganz deleted the ifexpression branch January 17, 2022 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant