-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.scalafmt.conf
60 lines (54 loc) · 1.35 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
version = "3.6.0"
runner.dialect = scala213source3
style = defaultWithAlign
assumeStandardLibraryStripMargin = true
maxColumn = 120
align {
preset = more
tokens."+" = ["*>", "<*>", "<*", ">>>", "++=", "+=", ":="]
}
newlines {
source = keep
beforeMultiline = unfold
forceBeforeAssign = def
forceBeforeMultilineAssign = any
alwaysBeforeMultilineDef = true
avoidInResultType = true
topLevelStatementBlankLines = [
{blanks {before = 1, after = 1, beforeAll = 0, afterAll = 0}, regex = "(Case|Defn.Def)"},
{maxNest = 0, blanks = 1}, // uses 2 blanks for all unindented statements
{regex = "^Import"} // excludes import groups; blanks are not specified
]
}
verticalMultiline {
arityThreshold = 5
atDefnSite = true
}
rewrite.rules = [
SortImports
RedundantBraces
RedundantParens
PreferCurlyFors
]
rewrite.redundantBraces.stringInterpolation = true
rewrite.scala3.convertToNewSyntax = false
rewriteTokens {
"=>": "⇒"
"->": "→"
"<-": "←"
}
//fileOverride {
// "glob:**.sbt" {
// maxColumn = 80
// runner.dialect = scala212
// rewrite.scala3.convertToNewSyntax = false
// // align.preset = most
// tokens."+" = ["++=", "+="]
// newlines.source = fold
// // newlines.beforeMultiline = unfold
// }
// "glob:**/src/test/scala/**.scala" {
// maxColumn = 120
// binPack.unsafeCallSite = true
// }
//}