-
Notifications
You must be signed in to change notification settings - Fork 2
/
.scalafmt.conf
164 lines (134 loc) · 2.67 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
version = 3.5.4
lineEndings = preserve
runner.dialect = scala213
project {
includePaths = [
"glob:**.scala",
"glob:**.sbt",
"glob:**.sc",
"glob:**.md",
]
}
fileOverride {
"glob:**.scala" {
runner.dialect = scala213source3
}
}
// So that the code can be viewed on laptops in split screen or on a phone
maxColumn = 80
assumeStandardLibraryStripMargin = true
indent {
main = 2
callSite = 2
ctrlSite = 2
defnSite = 2
ctorSite = 2
caseSite = 5
extendSite = 2
withSiteRelativeToExtends = 3
commaSiteRelativeToExtends = 2
extraBeforeOpenParenDefnSite = 0
}
indentOperator {
topLevelOnly = false
}
align {
preset = none
allowOverflow = false
multiline = false
arrowEnumeratorGenerator = false
openParenCallSite = false
closeParenSite = false
openParenCtrlSite = false
openParenDefnSite = false
openBracketCallSite = false
openBracketDefnSite = false
openParenTupleSite = false
stripMargin = true
}
newlines {
topLevelStatementBlankLines = [
{
blanks = 1
}
]
beforeMultiline = keep
alwaysBeforeElseAfterCurlyIf = false
implicitParamListModifierPrefer = after
avoidInResultType = true
sometimesBeforeColonInMethodReturnType = false
neverInResultType = true
}
danglingParentheses {
defnSite = true
callSite = true
ctrlSite = true
tupleSite = true
}
optIn {
configStyleArguments = true
breakChainOnFirstMethodDot = true
breaksInsideChains = false
encloseClassicChains = false
forceBlankLineBeforeDocstring = false
}
includeCurlyBraceInSelectChains = true
includeNoParensInSelectChains = true
spaces {
beforeContextBoundColon = Never
inImportCurlyBraces = false
inInterpolatedStringCurlyBraces = false
inParentheses = false
afterKeywordBeforeParen = true
inByNameTypes = true
afterSymbolicDefs = false
}
literals {
long = Upper
float = Lower
double = Lower
hexPrefix = Lower
hexDigits = Lower
scientific = Lower
}
xmlLiterals.assumeFormatted = true
rewrite {
rules = [
RedundantBraces,
SortModifiers,
PreferCurlyFors,
Imports,
]
redundantBraces {
generalExpressions = false
ifElseExpressions = false
methodBodies = false
includeUnitMethods = false
stringInterpolation = true
parensForOneLineApply = false
}
imports {
expand = false
sort = original
// groups = []
}
// trailingCommas.style = keep // for 3.0.5
}
trailingCommas = keep
importSelectors = noBinPack
comments {
wrap = trailing
wrapStandaloneSlcAsSlc = true
}
docstrings {
style = SpaceAsterisk
removeEmpty = true
oneline = unfold
wrap = yes
blankFirstLine = yes
}
rewriteTokens = {
"⇒": "=>"
"→": "->"
"←": "<-"
}