forked from Vyxal/Vyxal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.scalafmt.conf
39 lines (32 loc) · 1.27 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
version = "3.8.3"
runner.dialect = scala3
align.preset = none
maxColumn = 80
docstrings.oneline = fold
rewrite.scala3.convertToNewSyntax = yes
rewrite.scala3.removeOptionalBraces = yes
# Insert an end marker if a function/class/whatever is longer than 15 lines
rewrite.scala3.insertEndMarkerMinLines = 15
rewrite.scala3.removeEndMarkerMaxLines = 14
rewrite.scala3.countEndMarkerLines = lastBlockOnly
rewrite.rules = [Imports]
rewrite.imports.sort = original
# Any Vyxal imports go at the top
rewrite.imports.groups = [["scala\\.language\\..*"], ["vyxal\\..*"], ["scala\\..*", "java\\..*", "org\\.scalajs\\..*"]]
rewrite.imports.contiguousGroups = no
rewrite.trailingCommas.style = multiple # frick you removing my commas. # frick you lyxal I'll remove your commas if I damn well please # D:
newlines.beforeMultiline = fold
newlines.forceBeforeMultilineAssign = def
newlines.inInterpolation = avoid
newlines.afterInfix = many
newlines.beforeCurlyLambdaParams = multilineWithCaseOnly
optIn.annotationNewlines = true
optIn.breakChainOnFirstMethodDot = false
optIn.configStyleArguments = true
fileOverride {
# build.sc uses Scala 2, so we don't want to use Scala 3 syntax there
"glob:**/build.*" {
rewrite.scala3.convertToNewSyntax = no
rewrite.scala3.removeOptionalBraces = no
}
}