-
Notifications
You must be signed in to change notification settings - Fork 2
/
.scalafmt.conf
74 lines (63 loc) · 2.31 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
66
67
68
69
70
71
72
73
74
# Version https://scalameta.org/scalafmt/docs/configuration.html#version
version = 3.7.17
# Dialect https://scalameta.org/scalafmt/docs/configuration.html#scala-dialects
runner.dialect = scala213source3
# Top-level preset https://scalameta.org/scalafmt/docs/configuration.html#top-level-presets
preset = defaultWithAlign
# Common https://scalameta.org/scalafmt/docs/configuration.html#most-popular
maxColumn = 120
assumeStandardLibraryStripMargin = true
# Alignment https://scalameta.org/scalafmt/docs/configuration.html#alignment
align {
preset = more
allowOverflow = true
}
# Newlines https://scalameta.org/scalafmt/docs/configuration.html#newlines
newlines {
alwaysBeforeMultilineDef = false
implicitParamListModifierPrefer = before
beforeCurlyLambdaParams = multilineWithCaseOnly
inInterpolation = "avoid"
}
# Comment processing https://scalameta.org/scalafmt/docs/configuration.html#comment-processing
docstrings {
style = Asterisk
wrap = no
removeEmpty = true
}
# Spaces https://scalameta.org/scalafmt/docs/configuration.html#spaces
spaces {
inImportCurlyBraces = true # more idiomatic to include whitepsace in import x.{ yyy => zzz }
}
# Project https://scalameta.org/scalafmt/docs/configuration.html#project
project {
git = true
excludeFilters = ["target/"]
}
# Rewrite Rules https://scalameta.org/scalafmt/docs/configuration.html#rewrite-rules
rewrite {
rules = [
AvoidInfix, # https://scalameta.org/scalafmt/docs/configuration.html#avoidinfix
RedundantParens, # https://scalameta.org/scalafmt/docs/configuration.html#redundantparens
SortModifiers, # https://scalameta.org/scalafmt/docs/configuration.html#sortmodifiers
PreferCurlyFors, # https://scalameta.org/scalafmt/docs/configuration.html#prefercurlyfors
Imports, # https://scalameta.org/scalafmt/docs/configuration.html#imports
]
sortModifiers.order = ["private", "protected", "final", "sealed", "abstract", "implicit", "override", "lazy"]
imports {
expand = true
sort = original
groups = [["java(x)?\\..*"], ["scala\\..*"], ["sbt\\..*"]]
}
trailingCommas.style = keep # https://scalameta.org/scalafmt/docs/configuration.html#trailing-commas
}
fileOverride {
"glob:**/src/main/scala-3/**" {
runner.dialect = scala3
}
}
includeCurlyBraceInSelectChains = false
continuationIndent {
callSite = 2
defnSite = 4
}