-
Notifications
You must be signed in to change notification settings - Fork 148
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
No indentation after operator #216
Comments
Would indeed be nice if we could solve this (same applied to Spray back in the days, and also to the I think it could be formulated as "do not indent when line ends with XXX call", perhaps having that XXX configurable? |
Perhaps another reason to prefer akka/akka#19678 :) |
yes and no. akka/akka#19678 is not a magic bullet so let's not play it as one ;-) |
No, it's not a magic bullet. But it's possible that the hanging-indent behavior is desirable for most infix situations, but just not when the arguments themselves are really long, or multi-line, as they tend to be for
Might make sense, but not so much:
But one might also argue that the latter case is actually a poor fit for infix operators in the first place, as the infix operators get lost in the mix. AKA the reason for the Akka thought bubble in the first place. Right now, a missing |
I think it's a fairly reasonable enhancement to be able to specify "non-continuation" operators in a config. This would be a fairly big change if it were made general-purpose, since there isn't a way to provide a string (or set of strings) to a preference setting at the moment. |
Akka HTTP uses a routing DSL in which routes are constructed as follows:
Scalariform formats this as:
This causes unnecessary indenting and less readability. Here's a larger example.
It would be very nice if an option was added to not indent when an expression continues on a new line after an operator.
The text was updated successfully, but these errors were encountered: