From 601a6d3276ff09dca4c82141248efedf5f979b56 Mon Sep 17 00:00:00 2001 From: Heiko Seeberger Date: Tue, 16 Nov 2021 21:30:32 +0100 Subject: [PATCH] feat: use newlines.beforeCurlyLambdaParams for scalafmt (#326) --- .scalafmt.conf | 15 ++++++++------- .../de/heikoseeberger/sbtfresh/Template.scala | 15 ++++++++------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index c9ced6a..50783d4 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -3,10 +3,11 @@ version = "3.1.1" preset = "defaultWithAlign" runner.dialect = "scala213" -maxColumn = 100 -indentOperator.preset = "spray" -unindentTopLevelOperators = true -spaces.inImportCurlyBraces = true -rewrite.rules = ["AsciiSortImports", "RedundantBraces", "RedundantParens"] -docstrings.blankFirstLine = true -trailingCommas = "preserve" +maxColumn = 100 +indentOperator.preset = "spray" +unindentTopLevelOperators = true +spaces.inImportCurlyBraces = true +rewrite.rules = ["AsciiSortImports", "RedundantBraces", "RedundantParens"] +docstrings.blankFirstLine = true +trailingCommas = "preserve" +newlines.beforeCurlyLambdaParams = "multilineWithCaseOnly" diff --git a/src/main/scala/de/heikoseeberger/sbtfresh/Template.scala b/src/main/scala/de/heikoseeberger/sbtfresh/Template.scala index 70c7be5..744a76f 100644 --- a/src/main/scala/de/heikoseeberger/sbtfresh/Template.scala +++ b/src/main/scala/de/heikoseeberger/sbtfresh/Template.scala @@ -204,12 +204,13 @@ private object Template { |preset = "defaultWithAlign" |runner.dialect = "scala3" | - |maxColumn = 100 - |indentOperator.preset = "spray" - |unindentTopLevelOperators = true - |spaces.inImportCurlyBraces = true - |rewrite.rules = ["AsciiSortImports", "RedundantBraces", "RedundantParens"] - |docstrings.blankFirstLine = true - |trailingCommas = "preserve" + |maxColumn = 100 + |indentOperator.preset = "spray" + |unindentTopLevelOperators = true + |spaces.inImportCurlyBraces = true + |rewrite.rules = ["AsciiSortImports", "RedundantBraces", "RedundantParens"] + |docstrings.blankFirstLine = true + |trailingCommas = "preserve" + |newlines.beforeCurlyLambdaParams = "multilineWithCaseOnly" |""".stripMargin }