All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scalafmt.scalafmt.conf Maven / Gradle / Ivy

version = 3.7.3

# Runner

runner.dialect = scala213
#runner.debug = true

# Line length

maxColumn = 120

# Margins

assumeStandardLibraryStripMargin = true
align.stripMargin = true

# Indentation

indent.main = 2
indent.significant = 2
indent.callSite = 2
indent.ctrlSite = 2
indent.defnSite = 2
indent.ctorSite = 2
indent.caseSite = 2
indent.extendSite = 4
indent.withSiteRelativeToExtends = 0
indent.commaSiteRelativeToExtends = 2
indent.extraBeforeOpenParenDefnSite = 0

# Alignment

align.preset = some

# Newlines

newlines.source = keep
newlines.topLevelStatementBlankLines = [{ blanks { before = 1 } }]
newlines.topLevelBodyIfMinStatements = []
newlines.beforeTemplateBodyIfBreakInParentCtors = false
newlines.beforeMultiline = keep
newlines.forceBeforeMultilineAssign = never
newlines.alwaysBeforeElseAfterCurlyIf = false
newlines.beforeCurlyLambdaParams = never
newlines.afterCurlyLambdaParams = never
newlines.implicitParamListModifierPrefer = before
newlines.afterInfix = keep
newlines.avoidForSimpleOverflow = []
newlines.avoidInResultType = false
newlines.sometimesBeforeColonInMethodReturnType = true
newlines.beforeOpenParenDefnSite = null
newlines.beforeOpenParenCallSite = null
newlines.selectChains = keep
optIn.annotationNewlines = true
danglingParentheses.defnSite = true
danglingParentheses.callSite = true
danglingParentheses.ctrlSite = true
danglingParentheses.tupleSite = true
optIn.configStyleArguments = true

# Rewrite rules

rewrite.rules = [Imports, SortModifiers]
rewrite.imports.expand = true
rewrite.imports.sort = ascii
rewrite.trailingCommas.style = never
rewrite.imports.groups = [
  ["(?!(scala|java)).*"],
  ["java\\..*"],
  ["scala\\..*"]
]

# Comment processing

comments.wrap = no
comments.wrapStandaloneSlcAsSlc = false
docstrings.style = keep
docstrings.removeEmpty = true
docstrings.oneline = keep

# Spaces

spaces.beforeContextBoundColon=IfMultipleBounds
spaces.inImportCurlyBraces = false
spaces.inInterpolatedStringCurlyBraces = false
spaces.inParentheses = false
spaces.neverAroundInfixTypes = []
spaces.afterKeywordBeforeParen = true
spaces.inByNameTypes = true
spaces.afterSymbolicDefs = false

# Literals

literals.long = Upper
literals.float = Lower
literals.double = Lower
literals.hexPrefix = Lower
literals.hexDigits = Lower
literals.scientific = Upper

# XML

xmlLiterals.assumeFormatted = false

# Binpacking

binPack.literalArgumentLists = true
binPack.parentConstructors = keep

# Misc

rewriteTokens = {}
importSelectors = noBinPack




© 2015 - 2025 Weber Informatics LLC | Privacy Policy