You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry about spamming feature request lately! But I'm happy I've found a Lua-formatter/style checker that works for most of my needs!
Here's something I do with my code often, and I wonder if this could be added as some kind of rule. I tend to align multiline statements that start with operators and here's the different usecases I do them:
Alignment in if-statements:
-- NOTE: Alignment of the first line in if statements that have multilines that begin with an operator.-- The first expression is aligned with the first non-operator on the next line and so forth.-- the operators are aligned too. note that "then" closes the if on multiline statements and is on it's first line-- aligned with the "if":iftrueandtrueorfalseandfalseortruethenprint("Yay!")
end-- NOTE: A case where one of the preceding operators is longer than others:iftrueandtrueorfalseandfalsenottruethenprint("Yay!")
end
Aligment on multine expressions inside brackets (and for example in a return).
-- NOTE: The first expression is aligned according to the first non-operator below it and so forth:functionfoo()
return (
100*123+456
)
end
And lastly in assigment where there's a hanging "="-sign:
I understand if these are out of the scope for this stylechecker/formatter, but I tend to use these in a lot of my codebases and would really enjoy having them covered, but I understand if there are some tricky cornercases that make these difficult to implement!
The text was updated successfully, but these errors were encountered:
Sorry about spamming feature request lately! But I'm happy I've found a Lua-formatter/style checker that works for most of my needs!
Here's something I do with my code often, and I wonder if this could be added as some kind of rule. I tend to align multiline statements that start with operators and here's the different usecases I do them:
Alignment in if-statements:
Aligment on multine expressions inside brackets (and for example in a return).
And lastly in assigment where there's a hanging "="-sign:
I understand if these are out of the scope for this stylechecker/formatter, but I tend to use these in a lot of my codebases and would really enjoy having them covered, but I understand if there are some tricky cornercases that make these difficult to implement!
The text was updated successfully, but these errors were encountered: