-
Notifications
You must be signed in to change notification settings - Fork 0
/
.scalafmt.conf
65 lines (52 loc) · 2.03 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
// General Guides:
//"""
// CallSite: Place of calling a function
// DefnSite: Place of Defining a function
// Aligning: what operator should scalafmt align words around in multiline isntances of this operator
// case short => ...
// case waylonger => ..
//
// DanglingParentheses: Loner closing parentheses after function definition or calling
// rewrite.rules: Where your actual code should be changed not just formatted
// continuation.indent: Where you should indent your code if you decided to break a line.
//"""
version=2.0.0-RC5
//Defaults
style = defaultWithAlign
indentOperator = spray
maxColumn = 130
danglingParentheses = false
//Alignings
align = most
align.tokens = ["extends", "=", "%", "%%", {code = "=>", owner = "Case"}, "<-", {code = ":", owner = "Term.Param"}, "::"]
align.openParenCallSite = false
align.openParenDefnSite = false
//Misc
binPack.literalArgumentLists = false
binPack.parentConstructors = true
//Rewrite to cleaner code
rewrite.rules = [RedundantBraces, RedundantParens, SortModifiers, SortImports, PreferCurlyFors]
//When formatter should kick in
runner.optimizer.forceConfigStyleOnOffset = 120
runner.optimizer.forceConfigStyleMinArgCount = 1
//Indentations, NewLines and Spaces
unindentTopLevelOperators = true
includeCurlyBraceInSelectChains = false
optIn.breakChainOnFirstMethodDot = true
optIn.breaksInsideChains = false
continuationIndent.callSite = 2
continuationIndent.defnSite = 4
continuationIndent.extendSite = 4
spaces.afterKeywordBeforeParen = false
newlines.neverInResultType = false
newlines.neverBeforeJsNative = false
newlines.sometimesBeforeColonInMethodReturnType = true
newlines.penalizeSingleSelectMultiArgList = false
newlines.alwaysBeforeCurlyBraceLambdaParams = false
newlines.alwaysBeforeTopLevelStatements = false
newlines.afterCurlyLambda = never
newlines.afterImplicitKWInVerticalMultiline = false
newlines.beforeImplicitKWInVerticalMultiline = false
newlines.alwaysBeforeElseAfterCurlyIf = false
newlines.alwaysBeforeMultilineDef = true
verticalMultilineAtDefinitionSite = false