mirror of
https://github.com/enso-org/enso.git
synced 2024-12-27 11:12:32 +03:00
746521f8b2
Co-authored-by: Radosław Waśko <radoslaw.wasko@enso.org> Co-authored-by: Dmitry Bushev <bushevdv@gmail.com>
81 lines
2.0 KiB
Plaintext
81 lines
2.0 KiB
Plaintext
// 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.
|