Autoformat indents multi-line if block conditions incorrectly

According to Roblox’s styleguide, the correct way (and IMO the only good looking way) to format a multi-line if statement is like so:

if
    someReallyLongCondition
    and someOtherReallyLongCondition
    and somethingElse
then
    doSomething()
    doSomethingElse()
end

https://roblox.github.io/lua-style-guide/#newlines-in-long-expressions

However, Studio’s auto-formatter will try to indent the second, third, etc, lines of the condition, which is not correct.

For reproduction's sake
if
	true
	and true
	and true
then
	print()
end
7 Likes

Thanks for the report! We’ve filed a ticket to our internal database and we’ll follow up when we have an update for you.

3 Likes

This issue should now be resolved! If this issue is still occurring, please create a new topic for us to look into.

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.