Indenting For Comprehensions
nloyola opened this issue · 1 comments
nloyola commented
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 commented
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.