-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.scalafmt.conf
99 lines (79 loc) · 2.92 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# https://scalameta.org/scalafmt/docs/installation.html#sbt
version = 3.7.14
# https://scalameta.org/scalafmt/docs/configuration.html#scala-dialects
runner.dialect = scala3
# https://docs.scala-lang.org/style/declarations.html#modifiers
rewrite.rules = [SortModifiers]
rewrite.sortModifiers.order = [
"`final`"
"`implicit`"
"`override`"
"`protected`"
"`private`"
"`lazy`"
]
//rewrite.rules = [RedundantBraces]
//rewrite.redundantBraces.stringInterpolation = true
//rewrite.redundantBraces.defnBodies = "all"
//rewrite.redundantBraces.methodBodies = true
//rewrite.redundantBraces.includeUnitMethods = true
//rewrite.redundantBraces.generalExpressions = true
//rewrite.redundantBraces.ifElseExpressions = true
//newlines.afterCurlyLambdaParams=squash
# https://scalameta.org/scalafmt/docs/configuration.html#imports
rewrite.rules = [Imports]
//rewrite.imports.sort = scalastyle
rewrite.imports.sort = ascii
rewrite.imports.expand = true
rewrite.imports.groups = [
["io.github.greenleafoss.mongo.core\\..*"],
["io.github.greenleafoss.mongo.spray\\..*"],
["io.github.greenleafoss.mongo.play\\..*"],
["io.github.greenleafoss.mongo.circe\\..*"],
["org.mongodb\\..*"],
["org.bson\\..*"],
["java\\..*"],
["scala\\..*"]
]
# https://scalameta.org/scalafmt/docs/configuration.html#maxcolumn
# 80| 90| 100| 110| 120|
maxColumn = 120
# https://scalameta.org/scalafmt/docs/configuration.html#top-level-presets
preset = IntelliJ
# https://scalameta.org/scalafmt/docs/configuration.html#alignpreset
align.preset=most
align.multiline = true
align.arrowEnumeratorGenerator = false
align.openParenCallSite = false
align.openParenDefnSite = true
optIn.configStyleArguments = true
verticalMultiline.atDefnSite = true
# https://scalameta.org/scalafmt/docs/configuration.html#after-only
# implicit
# override private val ctx: Context,
# private val ops: Ops
newlines.implicitParamListModifierForce = [after]
//newlines.implicitParamListModifierForce = [before, after]
# https://scalameta.org/scalafmt/docs/configuration.html#indentextendsite
indent.extendSite = 2
# https://scalameta.org/scalafmt/docs/configuration.html#indentdefnsite
indent.defnSite = 4
indent.fewerBraces = always
# https://scalameta.org/scalafmt/docs/configuration.html#trailing-commas
rewrite.trailingCommas.style = never
# https://scalameta.org/scalafmt/docs/configuration.html#binpacking
# doesn't apply binpacking to calls with fewer arguments
binPack.literalsMinArgCount = 3
# https://scalameta.org/scalafmt/docs/configuration.html#binpackparentconstructors
binPack.parentConstructors = Never
//newlines.beforeTemplateBodyIfBreakInParentCtors = true
# https://scalameta.org/scalafmt/docs/configuration.html#literal-argument-lists
# List(
# 1,
# 2,
# 3,
# )
binPack.literalArgumentLists = false
binPack.literalsSingleLine = false
docstrings.style = Asterisk
docstrings.style = keep