-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.scalafmt.conf
43 lines (38 loc) · 1.2 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
#you need to specify the version of scalafmt you're using in the config to avoid any config change mishaps
version=3.0.1
#Alignment pattern to use
align.preset = none
#Aligns the | margin for multiline strings. can be a bit iffy at times
assumeStandardLibraryStripMargin = true
danglingParentheses.preset = true
docstrings.style = Asterisk
docstrings.style = keep
lineEndings = unix
maxColumn = 120
#amount of idents in spaces after linebreaks in open parens scenarios
continuationIndent {
callSite = 2
defnSite = 2
}
#where to insert newlines
newlines {
#eg between imports and top level object/class/trait
topLevelStatementsMinBreaks = 1
#multiline funcitons
alwaysBeforeMultilineDef = true
}
#where to put spaces inbetween
spaces {
afterKeywordBeforeParen = true
afterSymbolicDefs = true
inImportCurlyBraces = true
}
#rewriting of actual code
rewrite.rules = [
SortImports, #sorts your imports
AvoidInfix, #avoids infix except for symbolic operators
PreferCurlyFors, #rewrites for to cannonical curlybrace format
RedundantBraces, #removes redundant {}
RedundantParens, #removes redundant ()
SortModifiers #sorts modifiers like implicit final private lazy val
]