-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Newline after "bang" keywords in computation expressions. #615
Comments
Hello @fahrenq, the new version of Fantomas has nothing to do with the way bangs are formatted. The first thing that comes to mind is that the AST will be different with and without I'm ok with changing the current behaviour as it would be better if it is matching the style without Let me know if you need any further help, I'm also around on the F# Foundation slack if that helps. |
Thank you very much, I will check it out and will try to resolve it. |
We have a lot of computation expressions in our codebase, so I see this formatting inconsistency all the time too. +1'ed I much prefer the formatting of the ordinary Hoping for a fix for this soon 😄 |
* Use autoIndentNlnByFuture for let bang. Fixes #615 * Apply the same behavior when formatting !and
Dear maintainers,
Recently updated my Rider which apparently included the new version of Fantomas.
I found this behavior to be very strange:
And it also true for all other "bang" methods in computation expressions (
return!
,do!
, etc.)Please note it's not exclusive to pattern matching on the right side. I just chose it as an example from my production code, but in fact, any code block gets indented.
You can see more examples here.
While it doesn't look all that scary with examples above, production code has really weird looking indentation that's hard to work with.
I'm ready to contribute and adjust things above by myself, I just want some insights on why was this rule added in the first place? Should we make this behavior optional?
Thanks!
The text was updated successfully, but these errors were encountered: