-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.scalafmt.conf
36 lines (29 loc) · 1.19 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
version = 3.5.8
runner.dialect = scala213
maxColumn = 120
# lines starting with the margin character | will be indented differently
assumeStandardLibraryStripMargin = true
# tokens (e.g. => or <-) will be aligned. Empty to specify no alignment
align.tokens = []
newlines {
# always put a newline before and after curly braces
alwaysBeforeMultilineDef = false
# newline before implicit. Newline will not be added if the entire implicit parameter list fits on a line.
implicitParamListModifierPrefer = before
# controls how to format spliced scala code within string constants (e.g., s"...", etc).
# avoid: attempts to avoid breaks within the spliced code, regardless of line overflow
inInterpolation = "avoid"
# preserve line breaks in the input whenever possible
source = keep
}
# indentation before 'case' keyword
indent.caseSite = 2
rewrite {
rules = [
AvoidInfix, # replaces infix expressions a op b with proper method calls a.op(b)
RedundantParens # removes redundant parentheses
]
# keeps trailing commas
trailingCommas.style = keep # https://scalameta.org/scalafmt/docs/configuration.html#trailing-commas
}
project.excludePaths = [ "glob:**/target/**", "glob:**.sbt" ]