case class ScalafmtConfig(version: String = org.scalafmt.Versions.stable, maxColumn: Int = 80, docstrings: Docstrings = Docstrings.ScalaDoc, 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, verticalMultilineAtDefinitionSite: Boolean = false, verticalMultilineAtDefinitionSiteArityThreshold: Int = 100, verticalMultiline: VerticalMultiline = VerticalMultiline(), verticalAlignMultilineOperators: Boolean = false, onTestFailure: String = "", encoding: Codec = "UTF-8", project: ProjectFiles = ProjectFiles(), edition: Edition = Edition.Latest) extends Product with Serializable

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.

docstrings

Several options:

  • ScalaDoc: format as Scala docs
  • JavaDocs: format as Java docs
  • preserve: keep existing formatting
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.

unindentTopLevelOperators

If true, allows no indentation on infix operators in non-top-level functions. For example, function( a && b ) If false, only allows 0 space indentation for top-level statements a && b function( a && b ) Context: https://github.com/scala-js/scala-js/blob/master/CODINGSTYLE.md#long-expressions-with-binary-operators

includeCurlyBraceInSelectChains

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

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 )

poorMansTrailingCommasInConfigStyle

(experimental, may be removed) If true, formats config style like this: function( a , b , c )

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.

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScalafmtConfig
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ScalafmtConfig(version: String = org.scalafmt.Versions.stable, maxColumn: Int = 80, docstrings: Docstrings = Docstrings.ScalaDoc, 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, verticalMultilineAtDefinitionSite: Boolean = false, verticalMultilineAtDefinitionSiteArityThreshold: Int = 100, verticalMultiline: VerticalMultiline = VerticalMultiline(), verticalAlignMultilineOperators: Boolean = false, onTestFailure: String = "", encoding: Codec = "UTF-8", project: ProjectFiles = ProjectFiles(), edition: Edition = Edition.Latest)

    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.

    docstrings

    Several options:

    • ScalaDoc: format as Scala docs
    • JavaDocs: format as Java docs
    • preserve: keep existing formatting
    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.

    unindentTopLevelOperators

    If true, allows no indentation on infix operators in non-top-level functions. For example, function( a && b ) If false, only allows 0 space indentation for top-level statements a && b function( a && b ) Context: https://github.com/scala-js/scala-js/blob/master/CODINGSTYLE.md#long-expressions-with-binary-operators

    includeCurlyBraceInSelectChains

    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

    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 )

    poorMansTrailingCommasInConfigStyle

    (experimental, may be removed) If true, formats config style like this: function( a , b , c )

    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.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def activeFor(edition: Edition): Boolean
  5. val activeForEdition_2019_11: Boolean
  6. val activeForEdition_2020_01: Boolean
  7. val align: Align
  8. implicit val alignDecoder: ConfDecoder[Align]
  9. lazy val alignMap: Map[String, Regex]
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. val assumeStandardLibraryStripMargin: Boolean
  12. val binPack: BinPack
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. val continuationIndent: ContinuationIndent
  15. val danglingParentheses: DanglingParentheses
  16. val docstrings: Docstrings
  17. val edition: Edition
  18. val encoding: Codec
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  21. def forSbt: ScalafmtConfig
  22. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. val importSelectors: ImportSelectors
  24. val includeCurlyBraceInSelectChains: Boolean
  25. val includeNoParensInSelectChains: Boolean
  26. val indentOperator: IndentOperator
  27. val indentYieldKeyword: Boolean
  28. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  29. val lineEndings: LineEndings
  30. val literals: Literals
  31. val maxColumn: Int
  32. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. val newlines: Newlines
  34. val newlinesBeforeSingleArgParenLambdaParams: Boolean
  35. val newlinesBetweenCurlyAndCatchFinally: Boolean
  36. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  37. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  38. val onTestFailure: String
  39. val optIn: OptIn
  40. val poorMansTrailingCommasInConfigStyle: Boolean
  41. def productElementNames: Iterator[String]
    Definition Classes
    Product
  42. val project: ProjectFiles
  43. def reader: ConfDecoder[ScalafmtConfig]
  44. def reformatDocstrings: Boolean
  45. val rewrite: RewriteSettings
  46. val rewriteTokens: Map[String, String]
  47. val runner: ScalafmtRunner
  48. def scalaDocs: Boolean
  49. val spaces: Spaces
  50. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  51. val trailingCommas: TrailingCommas
  52. val unindentTopLevelOperators: Boolean
  53. val version: String
  54. val verticalAlignMultilineOperators: Boolean
  55. val verticalMultiline: VerticalMultiline
  56. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  57. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  58. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  59. def withDialect(dialect: Dialect): ScalafmtConfig

Deprecated Value Members

  1. val verticalMultilineAtDefinitionSite: Boolean
    Annotations
    @deprecated
    Deprecated

    (Since version 1.6.0) Use VerticalMultiline.atDefnSite instead

  2. val verticalMultilineAtDefinitionSiteArityThreshold: Int
    Annotations
    @deprecated
    Deprecated

    (Since version 1.6.0) Use VerticalMultiline.arityThreshold instead

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped