Skip to content
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

State: extend indent if relativeToLhsFirstLine #3334

Merged
merged 2 commits into from
Oct 7, 2022

Conversation

kitbellew
Copy link
Collaborator

Fixes #3327.

@kitbellew kitbellew requested a review from tgodzik October 1, 2022 04:40
@kitbellew kitbellew changed the title Router: fix match/infix indent after select chain State: extend indent if relativeToLhsFirstLine Oct 2, 2022
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from my side, just one comment.

@@ -3674,3 +3674,26 @@ type Inner[A] =
x
case _ =>
A
<<< #3327 match
indentOperator.relativeToLhsLastLine = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have tests checking this case with the default false?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i will add. also, the problem turned out to be deeper. for newlines.source = fold,unfold, infix RHS (but not match) is already indented correctly (probably didn't change for classic/keep for backwards compat), so i need to fix a little more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange formating of match block when newlines.selectChains = keep is used
2 participants