{"action":"created","issue":{"url":"https://api.github.com/repos/scalameta/scalafmt/issues/1039","repository_url":"https://api.github.com/repos/scalameta/scalafmt","labels_url":"https://api.github.com/repos/scalameta/scalafmt/issues/1039/labels{/name}","comments_url":"https://api.github.com/repos/scalameta/scalafmt/issues/1039/comments","events_url":"https://api.github.com/repos/scalameta/scalafmt/issues/1039/events","html_url":"https://github.com/scalameta/scalafmt/issues/1039","id":256861258,"number":1039,"title":"Feature: would like the opposite of binPack.parentConstructors=true","user":{"login":"kitbellew","id":7529386,"avatar_url":"https://avatars1.githubusercontent.com/u/7529386?v=4","gravatar_id":"","url":"https://api.github.com/users/kitbellew","html_url":"https://github.com/kitbellew","followers_url":"https://api.github.com/users/kitbellew/followers","following_url":"https://api.github.com/users/kitbellew/following{/other_user}","gists_url":"https://api.github.com/users/kitbellew/gists{/gist_id}","starred_url":"https://api.github.com/users/kitbellew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitbellew/subscriptions","organizations_url":"https://api.github.com/users/kitbellew/orgs","repos_url":"https://api.github.com/users/kitbellew/repos","events_url":"https://api.github.com/users/kitbellew/events{/privacy}","received_events_url":"https://api.github.com/users/kitbellew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-09-11T22:29:14Z","updated_at":"2018-01-01T18:12:54Z","closed_at":null,"author_association":"NONE","body":"This template is a guideline, not a strict requirement.\r\n- **Version**: 1.2.0\r\n- **Integration**: CLI\r\n- **Configuration**:\r\n```\r\nstyle = default\r\nmaxColumn = 100\r\ndanglingParentheses = true\r\n\r\nalign = none\r\nalign.tokens = []\r\nalign.openParenCallSite = false\r\n\r\nnewlines.alwaysBeforeTopLevelStatements = true\r\nnewlines.sometimesBeforeColonInMethodReturnType = false\r\nnewlines.alwaysBeforeCurlyBraceLambdaParams = true\r\nnewlines.afterImplicitKWInVerticalMultiline = true\r\nnewlines.beforeImplicitKWInVerticalMultiline = true\r\n\r\nrunner.fatalWarnings = true\r\nrunner.optimizer.forceConfigStyleOnOffset = 50\r\nrunner.optimizer.forceConfigStyleMinArgCount = 5\r\n\r\nrewrite.rules = [ExpandImportSelectors, PreferCurlyFors]\r\n```\r\n\r\n## Steps\r\n\r\nI ran scalafmt like this:\r\n\r\n```bash\r\nscalafmt\r\n```\r\n\r\n## Problem\r\n\r\nScalafmt formats code like this:\r\n```scala\r\nobject A extends B with C {\r\n```\r\n\r\n## Expectation\r\n\r\nI would like the formatted output to look like this:\r\n```scala\r\nobject A\r\n    extends B\r\n    with C\r\n{\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/scalameta/scalafmt/issues/comments/354667206","html_url":"https://github.com/scalameta/scalafmt/issues/1039#issuecomment-354667206","issue_url":"https://api.github.com/repos/scalameta/scalafmt/issues/1039","id":354667206,"user":{"login":"olafurpg","id":1408093,"avatar_url":"https://avatars0.githubusercontent.com/u/1408093?v=4","gravatar_id":"","url":"https://api.github.com/users/olafurpg","html_url":"https://github.com/olafurpg","followers_url":"https://api.github.com/users/olafurpg/followers","following_url":"https://api.github.com/users/olafurpg/following{/other_user}","gists_url":"https://api.github.com/users/olafurpg/gists{/gist_id}","starred_url":"https://api.github.com/users/olafurpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/olafurpg/subscriptions","organizations_url":"https://api.github.com/users/olafurpg/orgs","repos_url":"https://api.github.com/users/olafurpg/repos","events_url":"https://api.github.com/users/olafurpg/events{/privacy}","received_events_url":"https://api.github.com/users/olafurpg/received_events","type":"User","site_admin":false},"created_at":"2018-01-01T18:12:54Z","updated_at":"2018-01-01T18:12:54Z","author_association":"OWNER","body":"This should be possible to accommodate, scalafmt tries to fit the template parent constructors in a single line if it fits and falls back to one line per `extends/with`. The relevant piece of code is here https://github.com/scalameta/scalafmt/blob/509bad695ef6c4643554c72aef8d6975a18b92ce/scalafmt-core/shared/src/main/scala/org/scalafmt/internal/FormatOps.scala#L654\r\nand your expected output can probably be obtained by ignoring the `Split(Space, 0)` case under a configuration option like `newlines.alwaysInParentConstructors=true` (false by default)\r\n\r\n```scala\r\n      Split(Space, 0, ignoreIf = newlines.alwaysInParentConstructors)\r\n```"}}
{"actor":{"display_login":"olafurpg"}}