forked from enso-org/enso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.scalafmt.conf
80 lines (71 loc) · 2.04 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
// Scala Formatting Configuration
// All Scala files should be reformatted through this formatter before being
// committed to the repositories.
version = "2.7.4"
// Wrapping and Alignment
align = most
align.openParenCallSite = false
align.openParenDefnSite = false
align.tokens = [
{code = "=>", owner = "Case"}
{code = "%", owner = "Term.ApplyInfix"}
{code = "%%", owner = "Term.ApplyInfix"}
{code = "%%%", owner = "Term.ApplyInfix"}
{code = "="}
{code = "<-"}
{code = "-->>"}
{code = "->>"}
{code = "->"}
{code = "||"}
{code = "+:="}
{code = "?="}
{code = "extends"}
{code = "//"}
{code = "{"}
{code = "}"}
{code = ":", owner = "Defn.Def"}
{code = ":", owner = "Decl.Def"}
]
maxColumn = 80
verticalAlignMultilineOperators = true
// Comments and Documentation
docstrings = "spaceasterisk"
// Indentation
assumeStandardLibraryStripMargin = true
continuationIndent.callSite = 2
continuationIndent.defnSite = 2
// Newlines
newlines.neverInResultType = false
newlines.neverBeforeJsNative = false
newlines.sometimesBeforeColonInMethodReturnType = true
newlines.penalizeSingleSelectMultiArgList = true
newlines.alwaysBeforeCurlyBraceLambdaParams = false
newlines.alwaysBeforeTopLevelStatements = false
newlines.afterCurlyLambda = never
newlines.alwaysBeforeElseAfterCurlyIf = false
newlines.avoidAfterYield = true
verticalMultiline.atDefnSite = false
verticalMultiline.arityThreshold = 100
verticalMultiline.newlineBeforeImplicitKW = false
verticalMultiline.newlineAfterImplicitKW = false
verticalMultiline.newlineAfterOpenParen = false
verticalMultiline.excludeDanglingParens = [
"`class`"
"`trait`"
]
// Rewrite Rules
rewrite.rules = [
PreferCurlyFors,
RedundantParens,
SortModifiers,
SortImports,
]
rewrite.sortModifiers.order = [
"implicit", "final", "sealed", "abstract",
"override", "private", "protected", "lazy"
]
// Multiline Configuration
verticalMultiline.atDefnSite = false
verticalMultiline.arityThreshold = 6
// Please remember that `//format: off` and `//format: on` directives should be
// used sparingly, if at all.