-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.scalafmt.conf
146 lines (126 loc) · 3.65 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
version = 3.5.9
maxColumn = 120
assumeStandardLibraryStripMargin = true
runner.dialect = scala213source3
indent.main = 2
indent.callSite = 2
indent.ctrlSite = 2
indent.defnSite = 2
indent.ctorSite = 2
indent.caseSite = 2
indent.extendSite = 4
indent.withSiteRelativeToExtends = 2
indent.commaSiteRelativeToExtends = 4
indent.extraBeforeOpenParenDefnSite = 2
indentOperator.topLevelOnly = false
align.preset = some
align.tokens = [
{code = "%", owner = "Term.ApplyInfix"},
{code = "%%", owner = "Term.ApplyInfix"},
{code = "%%%", owner = "Term.ApplyInfix"},
{code = "=>", owner = "Case"}
]
align.arrowEnumeratorGenerator = false
align.closeParenSite = false
align.openParenCallSite = false
align.openParenDefnSite = false
align.openParenTupleSite = true
align.stripMargin = true
align.multiline = false
newlines.source = keep
newlines.topLevelStatementBlankLines = [
{
blanks { before = 1, after = 1 }
}
]
newlines.beforeTemplateBodyIfBreakInParentCtors = true
newlines.beforeMultiline = fold
newlines.alwaysBeforeElseAfterCurlyIf = false
newlines.beforeCurlyLambdaParams = never
newlines.afterCurlyLambdaParams = squash
newlines.implicitParamListModifierForce = [after]
newlines.avoidForSimpleOverflow = [punct]
newlines.avoidInResultType = true
newlines.neverBeforeJsNative = true
newlines.sometimesBeforeColonInMethodReturnType = false
danglingParentheses.defnSite = true
danglingParentheses.callSite = true
danglingParentheses.ctrlSite = true
danglingParentheses.tupleSite = true
runner.optimizer.forceConfigStyleOnOffset = 60
runner.optimizer.forceConfigStyleMinArgCount = 1
rewrite.rules = [
AvoidInfix,
RedundantBraces,
RedundantParens,
SortModifiers,
PreferCurlyFors
]
rewrite.neverInfix.excludeFilters."+" = [
# better for play-framework
and, andKeep, andThen,
# For scalatest
in, should, shouldBe, when, must, mustEqual, mustBe, "must_==="
]
rewrite.redundantBraces.stringInterpolation = true
rewrite.redundantBraces.generalExpressions = true
rewrite.redundantBraces.ifElseExpressions = true
rewrite.redundantBraces.methodBodies = true
rewrite.redundantBraces.includeUnitMethods = false
rewrite.redundantBraces.parensForOneLineApply = true
rewrite.trailingCommas.style = never
verticalMultiline.atDefnSite = false
verticalMultiline.newlineAfterOpenParen = true
spaces.beforeContextBoundColon = Never
spaces.inImportCurlyBraces = false
spaces.inInterpolatedStringCurlyBraces = false
spaces.inParentheses = false
spaces.afterKeywordBeforeParen = true
spaces.inByNameTypes = true
spaces.afterSymbolicDefs = false
spaces.neverAroundInfixTypes = ["##"]
literals.long = Upper
literals.float = Upper
literals.double = Upper
literals.hexPrefix = Lower
literals.hexDigits = Lower
literals.scientific = Lower
xmlLiterals.assumeFormatted = true
binPack.literalArgumentLists = true
includeCurlyBraceInSelectChains = true
includeNoParensInSelectChains = true
optIn.annotationNewlines = true
optIn.configStyleArguments = true
optIn.breakChainOnFirstMethodDot = true
optIn.breaksInsideChains = false
optIn.encloseClassicChains = false
optIn.forceBlankLineBeforeDocstring = true
rewriteTokens = {
"⇒": "=>"
"→": "->"
"←": "<-"
}
project.includePaths."+" = ["glob:**.md"]
fileOverride {
"glob:**/project/**.scala" {
newlines.source = unfold
}
"glob:**/project/Dependencies.scala" {
maxColumn = 150
align.preset = most
align.multiline = true
danglingParentheses.preset = false
}
"glob:**/project/DependenciesNPM.scala" {
maxColumn = 150
align.preset = more
align.multiline = true
align.tokens."+" = [
{code = "->", owner = "Term.ApplyInfix"}
]
}
"glob:**/build.sbt" {
maxColumn = 80
newlines.source = unfold
}
}