-
Notifications
You must be signed in to change notification settings - Fork 0
/
.scalafmt.conf
136 lines (118 loc) · 2.71 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
version = "3.4.0"
# These can be used to delimit zone to do not format
# // format: off
# // format: on
#
# Only format files tracked by git.
# project.git = true
#
# manually exclude/include files to format.
project.excludeFilters = [ client, generated ]
# project.includeFilters = [regex1, regex2]
runner.dialect = scala213
rewrite.scala3.removeOptionalBraces = yes
maxColumn = 120
assumeStandardLibraryStripMargin = true #x
trailingCommas = never
indentOperator.topLevelOnly = false #x
align {
preset = more
stripMargin = true
multiline = true #x
arrowEnumeratorGenerator = false
openParenCallSite = false
openParenDefnSite = false
}
continuationIndent {
callSite = 2
defnSite = 4
ctorSite = 4
extendSite = 4
withSiteRelativeToExtends = 0
}
danglingParentheses {
defnSite = true
callSite = true
ctrlSite = true
}
newlines {
source = fold #x it can be tuned using classic and adding Classic select chains
afterInfix = some #x
afterInfixMaxCountPerFile = 500
afterInfixMaxCountPerExprForSome = 10
afterInfixBreakOnNested = false
topLevelStatements = [before] #x
topLevelStatementsMinBreaks = 1
avoidInResultType = true #x
beforeMultiline = fold #x
beforeMultilineDef = fold #x
alwaysBeforeElseAfterCurlyIf = false
beforeCurlyLambdaParams = never
afterCurlyLambdaParams = squash #x
implicitParamListModifierPrefer = after
}
spaces {
beforeContextBoundColon = Never
inImportCurlyBraces = false
inParentheses = false
afterKeywordBeforeParen = true
inByNameTypes = true
afterSymbolicDefs = true #x
}
binPack {
literalArgumentLists = true
literalsSingleLine = false #x
parentConstructors = Oneline #x
}
verticalMultiline {
atDefnSite = false
arityThreshold = 10
newlineAfterOpenParen = true
}
literals {
long = Upper
float = Lower
double = Lower
hexPrefix = Lower
hexDigits = Upper #x
scientific = Lower
}
comments {
wrap = standalone # CAN BE PISSING
wrapStandaloneSlcAsSlc = false
}
docstrings {
style = AsteriskSpace #x
oneline = fold
wrap = no
}
optIn {
configStyleArguments = true
forceBlankLineBeforeDocstring = true
}
rewriteTokens = {
"⇒": "=>"
"→": "->"
"←": "<-"
}
rewrite.rules = [
AvoidInfix
RedundantBraces
RedundantParens
SortModifiers
PreferCurlyFors
SortImports
]
rewrite.redundantBraces {
stringInterpolation = true
generalExpressions = true # CAN BE PISSING
ifElseExpressions = false
methodBodies = true
includeUnitMethods = true
parensForOneLineApply = true
maxLines = 30 #x
}
runner.optimizer {
forceConfigStyleOnOffset = 150
forceConfigStyleMinArgCount = 2
}