Skip to content

Commit 135800a

Browse files
committed
Updated scalafmt config
1 parent bbbe14e commit 135800a

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.scalafmt.conf

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
version = "3.0.0-RC7"
2-
style = defaultWithAlign
1+
version = "3.7.15"
32

4-
align.openParenCallSite = false
5-
align.openParenDefnSite = false
3+
runner.dialect = scala3
4+
maxColumn = 80
5+
indentOperator = spray
6+
align.preset = more
67
align.tokens = [{code = "->"}, {code = "<-"}, {code = "=>", owner = "Case"}]
8+
align.multiline = true
9+
10+
711
continuationIndent.callSite = 2
812
continuationIndent.defnSite = 2
9-
danglingParentheses = true
10-
indentOperator = spray
11-
maxColumn = 100
1213
newlines.alwaysBeforeTopLevelStatements = true
14+
danglingParentheses = true
15+
1316
project.excludeFilters = [".*\\.sbt"]
14-
rewrite.rules = [RedundantParens, SortImports]
15-
spaces.inImportCurlyBraces = false
16-
unindentTopLevelOperators = true
17-
runner.dialect = scala3
17+
rewrite.rules = [AvoidInfix, RedundantParens, RedundantBraces,
18+
SortModifiers, PreferCurlyFors, Imports]
19+
rewrite.imports.sort = original
20+
21+
rewrite.scala3.convertToNewSyntax = true
22+
rewrite.scala3.removeOptionalBraces.enabled = true

build.sbt

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ val scala2Ver = "2.13.14"
1313
lazy val commonSettings = Seq(
1414

1515
scalaVersion := scala3Ver,
16+
scalafmtOnCompile = true,
1617

1718
scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
1819
case Some((2, 13)) => Seq("-Ytasty-reader")

0 commit comments

Comments
 (0)