-
Notifications
You must be signed in to change notification settings - Fork 1
/
.scalafmt.conf
59 lines (53 loc) · 1.5 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
version = "2.0.0"
#https://scalameta.org/scalafmt/docs/configuration.html#most-popular
maxColumn = 120
docstrings = ScalaDoc
assumeStandardLibraryStripMargin = true
# https://scalameta.org/scalafmt/docs/configuration.html#alignment
align {
tokens.add = [
{code = "⇒", owner = "Case"},
{code = "=>", owner = "Case"},
{code = "<-", owner = "Enumerator.Generator"},
{code = "←", owner = "Enumerator.Generator"},
{code = "%", owner = "Term.ApplyInfix"},
{code = "%%", owner = "Term.ApplyInfix"},
{code = "%%%", owner = "Term.ApplyInfix"},
{code = "=", owner = "(Enumerator.Val|Defn.(Va(l|r)|Def|Type))"}
]
openParenCallSite = true
openParenDefnSite = true
}
newlines {
alwaysBeforeElseAfterCurlyIf = false
alwaysBeforeTopLevelStatements = true
}
# https://scalameta.org/scalafmt/docs/configuration.html#vertical-multiline
rewrite {
rules = [RedundantBraces, RedundantParens, SortModifiers, PreferCurlyFors, AsciiSortImports]
redundantBraces.stringInterpolation = true
sortModifiers.order = [
"override",
"implicit",
"private",
"protected",
"sealed",
"abstract",
"final",
"lazy"
]
}
# https://scalameta.org/scalafmt/docs/configuration.html#vertical-multiline
verticalMultiline {
atDefnSite = false
newlineAfterOpenParen = true
newlineBeforeImplicitKW = false
}
# https://scalameta.org/scalafmt/docs/configuration.html#other
rewriteTokens {
"\t": " "
"→": "->"
"←": "<-"
"⇒": "=>"
}
verticalAlignMultilineOperators = false