-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scalafmt.conf
40 lines (36 loc) · 1.07 KB
/
.scalafmt.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version = 3.5.8
fileOverride { ".sbt" { runner.dialect = sbt1 } }
fileOverride { "glob:**/project/*.scala" { runner.dialect = sbt1 } }
runner.dialect = scala3
maxColumn = 100
assumeStandardLibraryStripMargin = true
align.preset = most
newlines.topLevelStatementBlankLines = [{blanks = 1}]
// why not remove useless braces and Parens?
rewrite.rules = [RedundantBraces]
// modifiers in fixed order makes it easy to read
rewrite.rules = [SortModifiers]
rewrite.rules = [PreferCurlyFors]
rewrite.rules = [SortImports]
// if number of parameters is or exceeds threshold or maxColumn is reached,
// each param will have his own line
verticalMultiline.atDefnSite = true
verticalMultiline.arityThreshold = 4
verticalMultiline.newlineAfterOpenParen = true
danglingParentheses.exclude = []
trailingCommas = multiple
rewrite.scala3.convertToNewSyntax = true
rewrite.scala3.removeOptionalBraces = yes
align.tokens."+" = [{
code = ":"
owners = [{
regex = "Term\\.Param"
parents = [ "Ctor\\.Primary" ]
}]
}]
align.tokens."+" = [{
code = ":"
owners = [{
parents = [ "Defn\\." ]
}]
}]