-
Notifications
You must be signed in to change notification settings - Fork 10
/
.scalafmt.conf
45 lines (35 loc) · 1.36 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
// Trial version of the config
// https://scalameta.org/scalafmt/docs/configuration.html
project.git = true
runner.dialect = scala213
version = 3.7.14
maxColumn = 120
trailingCommas = preserve
continuationIndent {
callSite = 2
defnSite = 2
}
align.preset = some
align.tokenCategory {
LeftArrow = Assign
Equals = Assign
}
# Mostly subset of `align.preset=more`, but with extra settings for `=`
# For all settings see `AlignToken#default` in
# https://github.com/scalameta/scalafmt/blob/master/scalafmt-core/shared/src/main/scala/org/scalafmt/config/AlignToken.scala
align.tokens.add = [
{ code = "%", owner = "Term.ApplyInfix" } # This is for Dependencies.scala…
{ code = "%%", owner = "Term.ApplyInfix" } # … and this as well.
{ code = "%%%", owner = "Term.ApplyInfix" } # … and this as well.
{ code = "=>", owner = "(Case|Term.Function)" }
{ code = "<-", owner = "Enumerator.Generator" }
{ code = "=", owner = "(Defn.Val|Defn.Var|Type|Def|Enumerator.Val|Assign|Term.Param)" } # Defn.Val is mostly for Dependencies.scala,
{ code = "->", owner = "Term.ApplyInfix" }
]
newlines.implicitParamListModifierPrefer = before
newlines.beforeCurlyLambdaParams = multilineWithCaseOnly
indentOperator.topLevelOnly = true
docstrings.blankFirstLine = keep
includeCurlyBraceInSelectChains = true
includeNoParensInSelectChains = true
optIn.breakChainOnFirstMethodDot = true