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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configuration to disable newlines between multiline defs #1134

Merged
merged 4 commits into from Apr 13, 2018

Conversation

2 participants
@iantabolt
Contributor

iantabolt commented Apr 13, 2018

Fixes #1126

This adds a new configuration newlines.alwaysBeforeMultilineDef, which is true by default (current behavior).

If newlines.alwaysBeforeMultilineDef is true, the formatter will always insert a newline before a multiline def 馃槃. For example

// newlines.alwaysBeforeMultilineDef = false
def foo(xs: List[Int]) = xs
  .flatMap(f)
  .map(g)

// newlines.alwaysBeforeMultilineDef = true
def foo(xs: List[Int]) = 
  xs
    .flatMap(f)
    .map(g)
@olafurpg

LGTM 馃憤 This is great, nice job @iantabolt

@olafurpg olafurpg merged commit 30b8c0e into scalameta:master Apr 13, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment