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

Allow for better formatting of curried parameter lists #159

Closed
kiritsuku opened this issue Feb 18, 2016 · 2 comments
Closed

Allow for better formatting of curried parameter lists #159

kiritsuku opened this issue Feb 18, 2016 · 2 comments

Comments

@kiritsuku
Copy link
Member

From @nairbv on January 1, 2016 17:46

As described in a comment on:
daniel-trinh#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.

Copied from original issue: daniel-trinh#104

@kiritsuku
Copy link
Member Author

From @nairbv on January 1, 2016 17:59

ah, I didn't see: daniel-trinh#4

@godenji
Copy link
Collaborator

godenji commented Oct 25, 2017

Fixed in 0.2.4

@godenji godenji closed this as completed Oct 25, 2017
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