-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scalafmt.conf
44 lines (36 loc) · 1.27 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
version = 3.6.1
runner.dialect = scala213
// Sets max amount of characters before new line
maxColumn = 160
// Sets indentation of method arguments and parameters
continuationIndent {
callSite = 2
defnSite = 2
}
// Aligns tokens for numerous methods e.g. matchers, for yield and module ID
align = most
align {
openParenCallSite = true
openParenDefnSite = true
tokens = ["%", "%%", ":=", "~=", {code = "=>", owner = "Case"}, "<-", "->", "="]
}
// PreferCurlyFors - Replaces parentheses into curly braces in for comprehensions that contain multiple enumerator generators.
// RedundantBraces - Removes redundant brances
// RedundantParens - Removes reduanant parentheses, including those within string interpolation
// SortModifiers - Sorts modifiers alphabetically
// SortImports - Sorts imports into groups of symbols, lower-case characters and upper-case characters
rewrite {
rules = [PreferCurlyFors, RedundantBraces, RedundantParens, SortModifiers, SortImports]
redundantBraces {
stringInterpolation = true
}
}
newlines {
source = keep
topLevelStatementBlankLines = [
{ blanks = 1 }
]
beforeCurlyLambdaParams = true
}
// Adds breaks between large lists
binPack.literalArgumentLists = true