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

Introduce "default", "akka" and "akka-http" as IndentOperator config #1090

Merged
merged 1 commit into from Dec 6, 2017

Conversation

2 participants
@daddykotex
Contributor

daddykotex commented Dec 6, 2017

This will allow users to override the current config via a comment and then set
it back to what it was. Something like:

// scalafmt: { indentOperator = spray }
get {
  path("hey) {
    complete("yeah!")
  } ~
  path("oh") {
    complete("oh oh")
  }
}
// scalafmt: { indentOperator = default }

I've reused an existing test but instead of indentOperator = spray, I used the new one: indentOperator = default to make sure it works. I'm not entirely sure the test is valuable, let me know otherwise.

Also, if I follow the contributing guidelines, I should be adding stuff to the documentation. IndentOperator are only found, AFAIK, in the Other section of the configuration. This section seems to be generated from default.fields and I can't figure out where this variable comes from.

There is also a mention of the IndentOperator in the fourth changelog. Should I add a changelog file?

@olafurpg

Thank you for this contribution! I think the changes are simple enough so we don't need tests :)

Introduce "default", "akka" and "akka-http" as IndentOperator config …
…values

This will allow users to override the current config via a comment and then set
it back to what it was. Something like:

```
// scalafmt: { indentOperator = spray }
get {
  path("hey) {
    complete("yeah!")
  } ~
  path("oh") {
    complete("oh oh")
  }
}
// scalafmt: { indentOperator = default }
```

This will allow # Please enter the commit message for your changes. Lines starting
@olafurpg

LGTM 👍 Thank you @daddykotex !

@olafurpg olafurpg merged commit 0f391aa into scalameta:master Dec 6, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@olafurpg olafurpg added this to the v1.3.1 milestone Jan 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment