-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Wrong indentation in pretty printer #56
Comments
@sureyeaah I don't remember if this behavior is intentional or not, but I agree that it doesn't make any sense. If you want to fix this when working on #25, please feel free. |
The 'expected behaviour' here is actually precisely what you get with As for how leading commas and four space indentation should interact, I've been pondering that while working on Fourmolu, where the status quo is close to your expected output, but that actually leads to a weird mix of two- and four-space indentation that I'm not happy with. So the current |
Well what i don't like about the current behaviour as described in the issue is that it makes no sense. Why are the first element's paranthesis indented with 4 spaces while third with 2 - doesn't seem right. If the expected behaviour is what pretty simple produces then this is resolved. |
Because in a sense the third subexpression isn't really indented at all. Regardless of the indentation step, there's just the one space after the comma. You could have this, but I think it looks weird: (
( 1
, 2
)
, 3
, ( 4 )
)
I think if you care about those lining up, you have to just use 2 space indentation. I've never seen a good solution with 4. |
Reproduce:
Current behavior
Expected behavior: First tuple should be aligned with the rest of the elements.
Is the current behavior intentional?
The text was updated successfully, but these errors were encountered: