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

Explain limitations of newlines.afterCurlyLambdaParams #2824

Merged
merged 1 commit into from
Oct 27, 2021

Conversation

tgodzik
Copy link
Contributor

@tgodzik tgodzik commented Oct 27, 2021

Fixes #2822

docs/configuration.md Outdated Show resolved Hide resolved
@@ -1725,6 +1725,9 @@ something.map { x =>
something.map { x => f(x) }
```

`afterCurlyLambdaParams` cannot be used with `newlines.source = fold` or
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. is that really true? it doesn't work for any value, or just keep? or did i perhaps make a mistake in the validation code, and in reality it would work even for keep?

  2. if this doesn't work, then we should remove the example comments which mention behavior when source is fold or unfold.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

exactly. i was saying that perhaps this check should be removed, and the formatter will do the right thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left the check for fold since these options do not work together, keep will be overriden by fold

@tgodzik tgodzik force-pushed the update-docs branch 2 times, most recently from edd98b7 to 4601611 Compare October 27, 2021 15:05
Also allow to use `newlines.afterCurlyLambdaParams.keep` with `newlines.source.unfold`
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.

Cannot use newlines.source=fold and newlines.afterCurlyLambdaParams=keep
2 participants