Package

org.scalafmt

config

Permalink

package config

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. config
  2. ScalafmtConfDecoders
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Align(multiline: Boolean = false, stripMargin: Boolean = true, openParenCallSite: Boolean = false, openParenDefnSite: Boolean = false, tokens: Seq[AlignToken] = Seq(AlignToken.caseArrow), arrowEnumeratorGenerator: Boolean = false, ifWhileOpenParen: Boolean = false, tokenCategory: Map[String, String] = Map(), treeCategory: Map[String, String] = ...) extends Decodable[Align] with Product with Serializable

    Permalink

    stripMargin

    If set, indent lines with a strip-margin character in a multiline string constant relative to the opening quotes (or the strip-margin character if present) on the first line; otherwise, indent relative to the beginning of the first line, as usual.

    openParenCallSite

    If true AND bin-packing is true, then call-site arguments won't be aligned by the opening parenthesis. For example, this output will be disallowed function(a, b, c)

    openParenDefnSite

    Same as openParenCallSite, except definition site.

    tokens

    The tokens to vertically align by. The "owner" is the scala.meta.Tree.getClass.getName of the deepest tree node that "owns" the token to align by. Examples: align.tokens = ["="] // align = owned by any tree node (not recommended) align.tokens = [ { code = "=", owner = "Param" } // align = when owned by parameter tree nodes ] Pro tip. if you use for example preset = defaultWithAlign and want to add one extra token (for example "|>") to align by, write align.tokens.add = [ "|> ] NOTE. Adding more alignment tokens may potentially decrease the vertical alignment in formatted output. Customize at your own risk, I recommend you try and stick to the default settings.

    arrowEnumeratorGenerator

    If true, aligns by <- in for comprehensions.

    ifWhileOpenParen

    If true, aligns by ( in if/while/for. If false, indents by continuation indent at call site.

    tokenCategory

    Customize which token kinds can align together. By default, only tokens with the same Token.productPrefix align. To for example align = and <-, set the values to: Map("Equals" -> "Assign", "LeftArrow" -> "Assign") Note. Requires mixedTokens to be true.

    treeCategory

    Customize which tree kinds can align together. By default, only trees with the same Tree.productPrefix align. To for example align Defn.Val and Defn.Var, set the values to: Map("Defn.Var" -> "Assign", "Defn.Val" -> "Assign") Note. Requires mixedOwners to be true.

  2. case class AlignToken(code: String, owner: String) extends Product with Serializable

    Permalink

    Configuration option for aligning tokens.

    Configuration option for aligning tokens.

    code

    string literal value of the token to align by.

    owner

    regexp for class name of scala.meta.Tree "owner" of code.

  3. case class BaseStyle(style: ScalafmtConfig) extends Product with Serializable

    Permalink
  4. case class BinPack(unsafeCallSite: Boolean = false, unsafeDefnSite: Boolean = false, parentConstructors: ParentCtors = BinPack.ParentCtors.MaybeNever, literalArgumentLists: Boolean = true, literalsIncludeSimpleExpr: Boolean = false, literalsSingleLine: Boolean = false, literalsMinArgCount: Int = 5, literalsInclude: Seq[String] = Seq(".*"), literalsExclude: Seq[String] = Seq("String", "Term.Name")) extends Decodable[BinPack] with Product with Serializable

    Permalink

    unsafeCallSite

    DO NOT USE! This option is buggy for complicated expressions. The only reason this option exists is to support the literalArgumentLists option, which enables callSite only for simple expressions. If true, will fit as many arguments on each line, only breaking at commas. If false, a function call's arguments will either be all on the same line or will have one line each.

    unsafeDefnSite

    Same as unsafeCallSite, except for definition site.

    parentConstructors

    Parent constructors are C and D in "class A extends B with C and D". If "Always", scalafmt will fit as many parent constructors on a single line. If "Never", each parent constructor gets its own line.

    literalArgumentLists

    If true, automatically sets the style to bin-pack for argument lists that only consist of literals.

    literalsMinArgCount

    Argument list must be longer than this setting to be eligible for literalArgumentLists.

    literalsInclude

    Regexes for literal type names. For example, "Int" or "Byte".

    literalsExclude

    Regexes for literal to exclude from literalArgumentLists.

  5. sealed abstract class Case extends AnyRef

    Permalink
  6. case class Comments(wrap: Wrap = Comments.Wrap.no, wrapStandaloneSlcAsSlc: Boolean = false) extends Product with Serializable

    Permalink

    wrap

    defines whether to wrap comments; the comment to be wrapped may not contain nested comments.

    • no: do not wrap
    • trailing: wrap the last comment on a line (line break after)
    • standalone: wrap standalone comments (line break both before and after the comment)
    wrapStandaloneSlcAsSlc

    if wrap is enabled, wrap standalone single-line comments (//) using the same type, rather than multi-line comments (/* ... */); it won't be applied to trailing comments as indentation would be inconsistent.

  7. case class ContinuationIndent(callSite: Int = 2, defnSite: Int = 4, ctorSite: Option[Int] = None, extendSite: Int = 4, withSiteRelativeToExtends: Int = 0) extends Product with Serializable

    Permalink

    callSite

    indentation around function calls, etc.

    defnSite

    indentation around class/def

    ctorSite

    indentation around class constructor parameters

    extendSite

    indentation before extends

    withSiteRelativeToExtends

    additional indentation before with

  8. case class DanglingParentheses(callSite: Boolean, defnSite: Boolean, ctrlSite: Boolean = true, exclude: List[Exclude] = Nil) extends Decodable[DanglingParentheses] with Product with Serializable

    Permalink
  9. abstract class Decodable[A] extends AnyRef

    Permalink
  10. case class Docstrings(oneline: Oneline = Docstrings.Oneline.keep, wrap: Wrap = Docstrings.Wrap.no, style: Option[Style] = Some(Docstrings.SpaceAsterisk)) extends Product with Serializable

    Permalink

    oneline

    • if fold, try to fold short docstrings into a single line
    • if unfold, unfold a single-line docstring into multiple lines
    • if keep, preserve the current formatting
    wrap

    if yes, allow reformatting/rewrapping the contents of the docstring

    style

    • Asterisk: format intermediate lines with an asterisk below the first asterisk of the first line (aka JavaDoc)
    • SpaceAsterisk: format intermediate lines with a space and an asterisk, both below the two asterisks of the first line
    • AsteriskSpace: format intermediate lines with an asterisk and a space, both below the two asterisks of the first line
  11. case class FilterMatcher(include: Regex, exclude: Regex) extends Product with Serializable

    Permalink
  12. abstract class FormatEvent extends AnyRef

    Permalink

    An event that happens while formatting a file.

  13. sealed abstract class ImportSelectors extends Decodable[ImportSelectors]

    Permalink

    ADT representing import selectors settings, specifically pertaining to the handling when multiple names are imported from the same package.

    ADT representing import selectors settings, specifically pertaining to the handling when multiple names are imported from the same package.

    When org.scalafmt.config.ImportSelectors.noBinPack is selected, imports are organized such that each line contains a single name imported from the base package:

    // max columns     |
    import org.{
      Aaaa,
      Bbbb,
      C,
      D,
      Eeee
    }

    When org.scalafmt.config.ImportSelectors.binPack is selected, imports are organized such that each line contains as many names as will fit within the column limit:

    // max columns     |
    import org.{
      Aaaa, Bbbb, C, D,
      Eeee
    }

    When org.scalafmt.config.ImportSelectors.singleLine is selected, imports are organized such that all names for a single package are arranged on a single line:

    // max columns     |
    import org.{Aaaa, Bbbb, C, D, Eeee}
  14. case class IndentOperator(topLevelOnly: Boolean = true, include: String = ".*", exclude: String = "^(&&|\\|\\|)$") extends Decodable[IndentOperator] with Product with Serializable

    Permalink

    topLevelOnly

    If true, allows no indentation on infix operators in top-level functions only. For example,

    // top-level, flag doesn't apply
    a &&
    b
    // true
    function(
      a &&
        b
    )
    // false
    function(
      a &&
      b
    )
    include

    Regexp for which infix operators should indent by 2 spaces. For example, .*= produces this output

    a &&
    b
    a +=
      b
    exclude

    Regexp for which infix operators should not indent by 2 spaces. For example, when include is .* and exclude is &&

    a &&
    b
    a ||
      b
    a +=
      b
    See also

    For context: https://github.com/scala-js/scala-js/blob/master/CODINGSTYLE.md#long-expressions-with-binary-operators

  15. sealed abstract class LineEndings extends AnyRef

    Permalink
  16. case class Literals(long: Case = Case.Upper, float: Case = Case.Lower, double: Case = Case.Lower, hexDigits: Case = Case.Lower, hexPrefix: Case = Case.Lower, scientific: Case = Case.Lower) extends Product with Serializable

    Permalink
  17. type MetaParser = Parse[_ <: Tree]

    Permalink
  18. case class Newlines(source: SourceHints = Newlines.classic, avoidInResultType: Boolean = false, neverBeforeJsNative: Boolean = false, sometimesBeforeColonInMethodReturnType: Boolean = true, penalizeSingleSelectMultiArgList: Boolean = true, alwaysBeforeCurlyBraceLambdaParams: Boolean = false, beforeCurlyLambdaParams: BeforeCurlyLambdaParams = BeforeCurlyLambdaParams.never, topLevelStatementsMinBreaks: Int = 1, topLevelStatements: Seq[BeforeAfter] = Seq.empty, alwaysBeforeTopLevelStatements: Boolean = false, afterCurlyLambdaParams: AfterCurlyLambdaParams = AfterCurlyLambdaParams.never, implicitParamListModifierForce: Seq[BeforeAfter] = Seq.empty, implicitParamListModifierPrefer: Option[BeforeAfter] = None, alwaysBeforeElseAfterCurlyIf: Boolean = false, alwaysBeforeMultilineDef: Boolean = false, beforeMultiline: Option[SourceHints] = None, beforeMultilineDef: Option[SourceHints] = None, afterInfix: Option[AfterInfix] = None, afterInfixBreakOnNested: Boolean = false, afterInfixMaxCountPerExprForSome: Int = 10, afterInfixMaxCountPerFile: Int = 500, avoidForSimpleOverflow: Seq[AvoidForSimpleOverflow] = Seq.empty, avoidAfterYield: Boolean = true) extends Product with Serializable

    Permalink

    source

    Controls how line breaks in the input source are handled If classic (default), the old mixed behaviour will be used If keep, try to keep source newlines If fold, ignore source and try to remove line breaks If unfold, ignore source and try to break lines

    neverBeforeJsNative

    If true, a newline will never be placed in front of js.native.

    sometimesBeforeColonInMethodReturnType

    If true, scalafmt may choose to put a newline before colon : at defs.

    penalizeSingleSelectMultiArgList

    If true, adds a penalty to newlines before a dot starting a select chain of length one and argument list. The penalty matches the number of arguments to the select chain application.

    // If true, favor
    logger.elem(a,
                b,
                c)
    // instead of
    logger
      .elem(a, b, c)
    // penalty is proportional to argument count, example:
    logger.elem(a, b, c)    // penalty 2
    logger.elem(a, b, c, d) // penalty 3, etc.

    If false, matches pre-v0.5 behavior. Note. this option may be removed in a future release.

    beforeCurlyLambdaParams

    • if Never, tries to use a space between the opening curly brace and the list of parameters of anonymous functions, and some partial functions (those with a single case clause and no conditions)
    • if MultilineWithCaseOnly, forces a newline in partial functions (see above) which can't be formatted on a single line
    • if Always, forces a newline in lambda and partial functions. For example:
    something.map {
      n =>
        consume(n)
    }
    topLevelStatementsMinBreaks

    Minimum span (number of line breaks between first and last line) to start forcing blank lines.

    topLevelStatements

    Forces a blank line before and/or after a top-level statement.

    afterCurlyLambdaParams

    If never (default), it will remove any extra lines below curly lambdas

    something.map { x =>
      f(x)
    }

    will become

    something.map { x =>
      f(x)
    }

    If always, it will always add one empty line (opposite of never). If preserve, and there isn't an empty line, it will keep it as it is. If there is one or more empty lines, it will place a single empty line. If squash, it will try to squash lambda body in one line:

    xs.map { x =>
      x + 1
    }

    will become

    xs.map { x => x + 1 }
    alwaysBeforeElseAfterCurlyIf

    if true, add a new line between the end of a curly if and the following else. For example if(someCond) { // ... } else //...

    beforeMultilineDef

    If unfold (or true), add a newline before the body of a multiline def without curly braces. See #1126 for discussion. For example,

    // newlines.beforeMultilineDef = fold
    def foo(bar: Bar): Foo = bar
      .flatMap(f)
      .map(g)
    // newlines.beforeMultilineDef = unfold
    def foo(bar: Bar): Foo =
      bar
        .flatMap(f)
        .map(g)
    afterInfix

    Controls how line breaks around operations are handled If keep (default for source=classic,keep), preserve existing If some (default for source=fold), break after some infix ops If many (default for source=unfold), break after many infix ops

    afterInfixBreakOnNested

    Force breaks around nested (enclosed in parentheses) expressions

    afterInfixMaxCountPerExprForSome

    Switch to many for a given expression (possibly nested) if the number of operations in that expression exceeds this value AND afterInfix had been set to some.

    afterInfixMaxCountPerFile

    Switch to keep for a given file if the total number of infix operations in that file exceeds this value

    avoidForSimpleOverflow

    • punct: don't force break if overflow is only due to trailing punctuation
    • tooLong: don't force break if overflow is due to tokens which are too long and would likely overflow even after a break
    avoidAfterYield

    If false (legacy behavior), inserts unconditional line break after yield if the yield body doesn't fit on a single line. For example,

    // newlines.avoidAfterYield = true (default)
    for (a <- as)
    yield Future {
      ...
    }
    // newlines.avoidAfterYield = false (default before v2).
    for (a <- as)
    yield
      Future {
        ...
      }
  19. case class OptIn(configStyleArguments: Boolean = true, breaksInsideChains: Boolean = false, breakChainOnFirstMethodDot: Boolean = true, encloseClassicChains: Boolean = false, selfAnnotationNewline: Boolean = true, annotationNewlines: Boolean = true, forceBlankLineBeforeDocstring: Boolean = true, blankLineBeforeDocstring: Boolean = false) extends Product with Serializable

    Permalink

    configStyleArguments

    Call-sites where there is a newline after opening ( and newline before closing ). If true, preserves the newlines and keeps one line per argument.

    breaksInsideChains

    NB: failure unless newlines.source=classic If true, then the user can opt out of line breaks inside select chains.

    // original
    foo
      .map(_ + 1).map(_ + 1)
      .filter(_ > 2)
    // if true
    foo
      .map(_ + 1).map(_ + 1)
      .filter(_ > 2)
    // if false
    foo
      .map(_ + 1)
      .map(_ + 1)
      .filter(_ > 2)
    breakChainOnFirstMethodDot

    NB: ignored unless newlines.source=classic If true, keeps the line break before a dot if it already exists.

    // original
    foo
      .map(_ + 1)
      .filter( > 2)
    // if true
    foo
      .map(_ + 1)
      .filter( > 2)
    // if false
    foo.map(_ + 1).filter( > 2)
    encloseClassicChains

    NB: ignored unless newlines.source=classic. Controls what happens if a chain enclosed in parentheses is followed by additional selects. Those additional selects will be considered part of the enclosed chain if and only if this flag is false.

    // original
    (foo.map(_ + 1).map(_ + 1))
      .filter(_ > 2)
    // if true
    (foo.map(_ + 1).map(_ + 1))
      .filter(_ > 2)
    // if false
    (foo
      .map(_ + 1)
      .map(_ + 1))
      .filter(_ > 2)
    selfAnnotationNewline

    See https://github.com/scalameta/scalafmt/issues/938 If true, will force a line break before a self annotation if there was a line break there before.

    annotationNewlines

    • if newlines.source is missing or keep:
      • if true, will keep existing line breaks around annotations
    • if newlines.source is fold:
      • if true, will break before the entity being annotatated
      • will not force break between consecutive annotations
    • if newlines.source is unfold:
      • if true, will break between consecutive annotations
      • will always break before the entity being annotatated
    forceBlankLineBeforeDocstring

    If true, always insert a blank line before docstrings, If false, preserves blank line only if one exists before. Example:

    // before
    object Foo {
      /** Docstring */
      def foo = 2
    }
    // after, if forceBlankLineBeforeDocstring=false
    object Foo {
      /** Docstring */
      def foo = 2
    }
    // after, if forceBlankLineBeforeDocstring=true
    object Foo {
      /** Docstring */
      def foo = 2
    }
  20. case class Pattern(includeFilters: Seq[String], excludeFilters: Seq[String]) extends Product with Serializable

    Permalink
  21. case class ProjectFiles(git: Boolean = false, files: Seq[String] = Nil, includeFilters: Seq[String] = ..., excludeFilters: Seq[String] = Nil) extends Product with Serializable

    Permalink
  22. case class RedundantBracesSettings(methodBodies: Boolean = true, includeUnitMethods: Boolean = true, maxLines: Int = 100, stringInterpolation: Boolean = false, parensForOneLineApply: Option[Boolean] = None, generalExpressions: Boolean = true, ifElseExpressions: Boolean = false) extends Product with Serializable

    Permalink
  23. case class RewriteSettings(rules: Seq[Rewrite] = Nil, redundantBraces: RedundantBracesSettings = RedundantBracesSettings(), sortModifiers: SortSettings = SortSettings.default, neverInfix: Pattern = Pattern.neverInfix) extends Product with Serializable

    Permalink
  24. trait ScalafmtConfDecoders extends AnyRef

    Permalink
  25. case class ScalafmtConfig(version: String = org.scalafmt.Versions.stable, maxColumn: Int = 80, docstrings: Docstrings = Docstrings(), comments: Comments = Comments(), optIn: OptIn = OptIn(), binPack: BinPack = BinPack(), continuationIndent: ContinuationIndent = ContinuationIndent(), align: Align = Align(), spaces: Spaces = Spaces(), literals: Literals = Literals(), lineEndings: LineEndings = LineEndings.unix, rewriteTokens: Map[String, String] = Map.empty[String, String], rewrite: RewriteSettings = RewriteSettings(), indentOperator: IndentOperator = IndentOperator(), newlines: Newlines = Newlines(), runner: ScalafmtRunner = ScalafmtRunner.default, indentYieldKeyword: Boolean = true, importSelectors: ImportSelectors = ImportSelectors.noBinPack, unindentTopLevelOperators: Boolean = false, includeCurlyBraceInSelectChains: Boolean = true, includeNoParensInSelectChains: Boolean = false, assumeStandardLibraryStripMargin: Boolean = false, danglingParentheses: DanglingParentheses = DanglingParentheses(true, true), poorMansTrailingCommasInConfigStyle: Boolean = false, trailingCommas: TrailingCommas = TrailingCommas.never, verticalMultiline: VerticalMultiline = VerticalMultiline(), verticalAlignMultilineOperators: Boolean = false, onTestFailure: String = "", encoding: Codec = "UTF-8", project: ProjectFiles = ProjectFiles(), fileOverride: Obj = Conf.Obj.empty, xmlLiterals: XmlLiterals = XmlLiterals()) extends Product with Serializable

    Permalink

    Configuration options for scalafmt.

    Configuration options for scalafmt.

    version

    The version of scalafmt to use for this project. Currently not used, the plan is to use this field for the IntelliJ+sbt integrations.

    maxColumn

    Column limit, any formatting exceeding this field is penalized heavily.

    lineEndings

    If LineEndings.unix, output will include only unix line endings If LineEndings.windows, output will include only windows line endings If LineEndings.preserve, output will include endings included in original file (windows if there was at least one windows line ending, unix if there was zero occurrences of windows line endings)

    rewriteTokens

    Map of tokens to rewrite. For example, Map("⇒" -> "=>") will rewrite unicode arrows to regular ascii arrows.

    indentYieldKeyword

    If true, indents yield by two spaces for (i <- j) yield banana If false, treats yield like else for (i <- j) yield banana

    importSelectors

    Controls formatting of import selectors with multiple names from the same package; If org.scalafmt.config.ImportSelectors.binPack, import selectors are arranged to fit within the maximum line width If org.scalafmt.config.ImportSelectors.noBinPack, import selectors are broken to one per line If org.scalafmt.config.ImportSelectors.singleLine, import selectors are kept on a single line The default setting is currently noBinPack.

    includeCurlyBraceInSelectChains

    NB: failure unless newlines.source=classic If true, includes curly brace applications in select chains/pipelines.

    // If true
    List(1)
      .map { x =>
        x + 2
      }
      .filter(_ > 2)
    // If false
    List(1).map { x =>
        x + 2
    }.filter(_ > 2)
    includeNoParensInSelectChains

    NB: ignored unless newlines.source=classic If true, includes applications without parens in select chains/pipelines.

    // If true
    List(1)
      .toIterator
      .buffered
      .map(_ + 2)
      .filter(_ > 2)
    // If false
    List(1).toIterator.buffered
      .map(_ + 2)
      .filter(_ > 2)
    assumeStandardLibraryStripMargin

    If true, the margin character | is treated as the new indentation in multiline strings ending with .stripMargin.

    danglingParentheses

    If true AND @binPackArguments is true AND @configStyleArguments is false, then this function( longerArg1, longerArg3) is formatted like this function( longerArg1, longerArg3 )

    trailingCommas

    If org.scalafmt.config.TrailingCommas.always, trailing commas are added everywhere a newline is followed by a right parens, brace or bracket. If org.scalafmt.config.TrailingCommas.never, trailing commas are removed whenever they appear. If org.scalafmt.config.TrailingCommas.preserve, existing trailing commas will be preserved, and no new ones will be added.

  26. class ScalafmtConfigException extends Exception

    Permalink
  27. case class ScalafmtOptimizer(dequeueOnNewStatements: Boolean = true, escapeInPathologicalCases: Boolean = true, maxVisitsPerToken: Int = 10000, maxEscapes: Int = 16, maxDepth: Int = 100, acceptOptimalAtHints: Boolean = true, disableOptimizationsInsideSensitiveAreas: Boolean = true, pruneSlowStates: Boolean = true, recurseOnBlocks: Boolean = true, forceConfigStyleOnOffset: Int = 150, forceConfigStyleMinArgCount: Int = 2) extends Product with Serializable

    Permalink

    Configuration for scalafmt optimizations.

    Configuration for scalafmt optimizations.

    dequeueOnNewStatements

    Clear the search queue on new statements.

    escapeInPathologicalCases

    Use heuristics to escape when the search state grows out of bounds. An optimization that trades off optimal formatting output in order to complete in a reasonable time. Used as a last resort.

    maxVisitsPerToken

    Visit the same formatToken at most maxVisitsPerToken times.

    maxEscapes

    How often do we try to escape before giving up and use original formatting.

    maxDepth

    Maximum depth of recursion.

    acceptOptimalAtHints

    Whether to listen to optimalAt fields in Splits.

    disableOptimizationsInsideSensitiveAreas

    Do not optimize inside certain areas such as term apply.

    pruneSlowStates

    Eliminate solutions that move slower than other solutions. If a solution reaches a point X first and other solution that reaches the same point later, the first solution is preferred if it can be verified to be always better (see org.scalafmt.internal.State.alwaysBetter). Note. This affects the output positively because it breaks a tie between two equally expensive solutions by eliminating the slower one. Example, solution 1 is preferred even though both solutions cost the same: // solution 1 a + b + c + d // solution 2 a + b + c + d

    recurseOnBlocks

    Recursively format { ... } blocks inside no optimization zones. By starting a new search queue, we can perform aggressive optimizations inside optimizations zones.

    forceConfigStyleOnOffset

    If negative number, does nothing. If n >= 0, then scalafmt will force "config style" on Term.Apply nodes IF it has more than forceConfigStyleMinArgCount arguments AND the non-whitespace byte offset between the opening parens and closing parens is greater than forceConfigStyleOnOffset. By forcing config style on such applications, the search space is greatly reduced.

  28. case class ScalafmtRunner(debug: Boolean = false, eventCallback: (FormatEvent) ⇒ Unit = null, parser: Parse[_ <: Tree] = Parse.parseSource, optimizer: ScalafmtOptimizer = ScalafmtOptimizer.default, maxStateVisits: Int = 1000000, dialect: Dialect = ScalafmtRunner.Dialect.default, ignoreWarnings: Boolean = false, fatalWarnings: Boolean = false) extends Product with Serializable

    Permalink

    A FormatRunner configures how formatting should behave.

    A FormatRunner configures how formatting should behave.

    debug

    Should we collect debugging statistics?

    eventCallback

    Listen to events that happens while formatting

    parser

    Are we formatting a scala.meta.{Source,Stat,Case,...}? For more details, see members of scala.meta.parsers.

  29. case class SortSettings(order: List[ModKey]) extends Product with Serializable

    Permalink
  30. sealed abstract class SpaceBeforeContextBound extends Decodable[SpaceBeforeContextBound]

    Permalink
  31. case class Spaces(beforeContextBoundColon: SpaceBeforeContextBound = Never, afterTripleEquals: Boolean = false, inImportCurlyBraces: Boolean = false, inParentheses: Boolean = false, neverAroundInfixTypes: Seq[String] = Nil, afterKeywordBeforeParen: Boolean = true, inByNameTypes: Boolean = true, afterSymbolicDefs: Boolean = false) extends Product with Serializable

    Permalink

    beforeContextBoundColon

    formats [A: T] as [A : T]

    afterTripleEquals

    If true, formats ===( as === (

    inImportCurlyBraces

    If true, formats import a.b.{ c, d }. If false, formats import a.b.{c, d}.

    inParentheses

    If true, formats foo(a, b) as foo( a, b ).

    neverAroundInfixTypes

    If ["##"] is specified as operator then formats Generic[Foo] ## Repr as Generic[Foo]##Repr.

    afterKeywordBeforeParen

    if false, does not add a space between a keyword and a parenthesis. For example: if(a) println("HELLO!") while(a) println("HELLO!")

    inByNameTypes

    If false, removes space in by-name parameter. def foo(a: =>A)

    afterSymbolicDefs

    If true, adds a single space after an operator method For example: def <=> [T](that: T): Boolean

  32. sealed abstract class TrailingCommas extends AnyRef

    Permalink

    ADT representing trailing commas settings

    ADT representing trailing commas settings

    When org.scalafmt.config.TrailingCommas.always is selected, trailing commas are added everywhere a newline is followed by a right parens, brace or bracket.

    When org.scalafmt.config.TrailingCommas.multiple is selected, trailing commas are only added if there's more than one non-repeated argument.

    When org.scalafmt.config.TrailingCommas.never is selected, trailing commas are removed whenever they appear.

    When org.scalafmt.config.TrailingCommas.preserve is selected, existing trailing commas will be preserved, and no new ones will be added.

  33. case class VerticalMultiline(atDefnSite: Boolean = false, arityThreshold: Int = 100, newlineBeforeImplicitKW: Boolean = false, newlineAfterImplicitKW: Boolean = false, newlineAfterOpenParen: Boolean = false, excludeDanglingParens: List[Exclude] = ...) extends Product with Serializable

    Permalink

    Configuration related to multi-line formatting.

  34. case class XmlLiterals(assumeFormatted: Boolean = false) extends Product with Serializable

    Permalink

Value Members

  1. object Align extends Serializable

    Permalink
  2. object AlignToken extends Serializable

    Permalink
  3. object BaseStyle extends Serializable

    Permalink
  4. object BinPack extends Serializable

    Permalink
  5. object Case

    Permalink
  6. object Comments extends Serializable

    Permalink
  7. object Config

    Permalink
  8. object ContinuationIndent extends Serializable

    Permalink
  9. object DanglingParentheses extends Serializable

    Permalink
  10. object Decodable

    Permalink
  11. object Docstrings extends Serializable

    Permalink
  12. object FilterMatcher extends Serializable

    Permalink
  13. object FormatEvent

    Permalink
  14. object ImportSelectors

    Permalink
  15. object IndentOperator extends Serializable

    Permalink
  16. object LineEndings

    Permalink
  17. object Literals extends Serializable

    Permalink
  18. object Newlines extends Serializable

    Permalink
  19. object OptIn extends Serializable

    Permalink
  20. object Pattern extends Serializable

    Permalink
  21. object PlatformConfig

    Permalink
  22. object ProjectFiles extends Serializable

    Permalink
  23. object ReaderUtil

    Permalink
  24. object RedundantBracesSettings extends Serializable

    Permalink
  25. object RewriteSettings extends Serializable

    Permalink
  26. object ScalafmtConfDecoders extends ScalafmtConfDecoders

    Permalink
  27. object ScalafmtConfig extends Serializable

    Permalink
  28. object ScalafmtOptimizer extends Serializable

    Permalink
  29. object ScalafmtRunner extends Serializable

    Permalink
  30. object SortSettings extends Serializable

    Permalink
  31. object SpaceBeforeContextBound

    Permalink
  32. object Spaces extends Serializable

    Permalink
  33. object TrailingCommas

    Permalink
  34. object VerticalMultiline extends Serializable

    Permalink
  35. object XmlLiterals extends Serializable

    Permalink
  36. implicit lazy val codecReader: ConfDecoder[Codec]

    Permalink
    Definition Classes
    ScalafmtConfDecoders
  37. implicit lazy val eventReader: ConfDecoder[(FormatEvent) ⇒ Unit]

    Permalink
    Definition Classes
    ScalafmtConfDecoders
  38. implicit lazy val parseReader: ConfDecoder[MetaParser]

    Permalink
    Definition Classes
    ScalafmtConfDecoders

Inherited from ScalafmtConfDecoders

Inherited from AnyRef

Inherited from Any

Ungrouped