daniel-trinh/scalariform

Allow for better formatting of curried parameter lists

nairbv opened this issue · 2 comments

As described in a comment on:
#36

To be able to use multiple parameter lists in a nicely formatted way, while keeping a strict line-length restriction in scalastyle, it would be nice to be able to preserve new lines and indentation between parameter lists.

E.g. I would like to be able to write code like:

def aReallyLongMethodName(thatHasSomeParameters:WithLongTypes)
                         (andThenAnother:ParameterList) = foo

Without having it reformatted to:

def aReallyLongMethodName(thatHasSomeParameters:WithLongTypes)(andThenAnother:ParameterList) = foo

The simplest solution is just to preserve any existing whitespace between ) and (, and I think I could submit a pull request to do that.

There might be a nicer way to achieve the same result, e.g. actually formatting the indentation of the next parameter list to match the first, but that might take more effort to implement and might reduce flexibility for the programmer to indent to a specific level.

ah, I didn't see: #4

This issue was moved to scala-ide#159