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

Indenting For Comprehensions #134

Open
nloyola opened this issue May 15, 2017 · 1 comment
Open

Indenting For Comprehensions #134

nloyola opened this issue May 15, 2017 · 1 comment

Comments

@nloyola
Copy link
Contributor

nloyola commented May 15, 2017

Would it be possible to indent For Comprehensions like this?

for {
  i <- List
       .range(1, n)
       .filter(x => (x%2) == 0)
  j <- List
       .range(1, i)
  if isPrime(i+j)
} yield {i, j}

I.e., I want .range and .filter aligned under List.

I tried all the settings for scala-indent:default-run-on-strategy but they do not modify the indentation and I get:

for {
  i <- List
  .range(1, n)
  .filter(x => (x%2) == 0)
  j <- List
  .range(1, i)
  if isPrime(i+j)
} yield {i, j}
@fommil
Copy link
Contributor

fommil commented May 16, 2017

Sounds reasonable, you'll more than likely have to submit a PR for that. It would be good to support whatever scalafmt and scalariform do also.

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

No branches or pull requests

2 participants