Class/Object

org.scalafmt

ScalafmtStyle

Related Docs: object ScalafmtStyle | package scalafmt

Permalink

case class ScalafmtStyle(maxColumn: Int, reformatDocstrings: Boolean, scalaDocs: Boolean, alignStripMarginStrings: Boolean, binPackArguments: Boolean, binPackParameters: Boolean, configStyleArguments: Boolean, binPackDotChains: Boolean, noNewlinesBeforeJsNative: Boolean, superfluousParensIndent: Int, danglingParentheses: Boolean, alignByOpenParenCallSite: Boolean, alignByOpenParenDefnSite: Boolean, continuationIndentCallSite: Int, continuationIndentDefnSite: Int, alignTokens: Set[AlignToken], spacesInImportCurlyBraces: Boolean, allowNewlineBeforeColonInMassiveReturnTypes: Boolean, binPackParentConstructors: Boolean, spaceAfterTripleEquals: Boolean, rewriteTokens: Map[String, String], alignByArrowEnumeratorGenerator: Boolean, alignByIfWhileOpenParen: Boolean) extends Product with Serializable

Configuration options for scalafmt.

maxColumn

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

reformatDocstrings

If true, reformats docstrings according to @scalaDocs.

scalaDocs

Only used if @reformatDocstrings is true. If true, reformats docstrings to use scaladoc style docstring, otherwise use javadoc style.

alignStripMarginStrings

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

binPackArguments

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.

binPackParameters

Same as binPackArguments, except for def/class definition parameters.

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.

binPackDotChains

If true, will fit as many arguments on each line, only breaking at dots. If false, a either all selects go on the same line or will have one line each.

noNewlinesBeforeJsNative

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

superfluousParensIndent

Indent width inside unnecessary parentheses. For example: (function( baab) && // indent 4 caab)

danglingParentheses

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

alignByOpenParenCallSite

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)

continuationIndentCallSite

Indent width for line continuation at call site.

continuationIndentDefnSite

Indent width for line continuation at definition/declaration site.

allowNewlineBeforeColonInMassiveReturnTypes

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

binPackParentConstructors

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

spaceAfterTripleEquals

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

rewriteTokens

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

alignByArrowEnumeratorGenerator

If true, aligns by <- in for comprehensions.

alignByIfWhileOpenParen

If true, aligns by ( in if/while/for. If false, indents by continuationIndentCallSite.

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

Instance Constructors

  1. new ScalafmtStyle(maxColumn: Int, reformatDocstrings: Boolean, scalaDocs: Boolean, alignStripMarginStrings: Boolean, binPackArguments: Boolean, binPackParameters: Boolean, configStyleArguments: Boolean, binPackDotChains: Boolean, noNewlinesBeforeJsNative: Boolean, superfluousParensIndent: Int, danglingParentheses: Boolean, alignByOpenParenCallSite: Boolean, alignByOpenParenDefnSite: Boolean, continuationIndentCallSite: Int, continuationIndentDefnSite: Int, alignTokens: Set[AlignToken], spacesInImportCurlyBraces: Boolean, allowNewlineBeforeColonInMassiveReturnTypes: Boolean, binPackParentConstructors: Boolean, spaceAfterTripleEquals: Boolean, rewriteTokens: Map[String, String], alignByArrowEnumeratorGenerator: Boolean, alignByIfWhileOpenParen: Boolean)

    Permalink

    maxColumn

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

    reformatDocstrings

    If true, reformats docstrings according to @scalaDocs.

    scalaDocs

    Only used if @reformatDocstrings is true. If true, reformats docstrings to use scaladoc style docstring, otherwise use javadoc style.

    alignStripMarginStrings

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

    binPackArguments

    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.

    binPackParameters

    Same as binPackArguments, except for def/class definition parameters.

    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.

    binPackDotChains

    If true, will fit as many arguments on each line, only breaking at dots. If false, a either all selects go on the same line or will have one line each.

    noNewlinesBeforeJsNative

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

    superfluousParensIndent

    Indent width inside unnecessary parentheses. For example: (function( baab) && // indent 4 caab)

    danglingParentheses

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

    alignByOpenParenCallSite

    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)

    continuationIndentCallSite

    Indent width for line continuation at call site.

    continuationIndentDefnSite

    Indent width for line continuation at definition/declaration site.

    allowNewlineBeforeColonInMassiveReturnTypes

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

    binPackParentConstructors

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

    spaceAfterTripleEquals

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

    rewriteTokens

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

    alignByArrowEnumeratorGenerator

    If true, aligns by <- in for comprehensions.

    alignByIfWhileOpenParen

    If true, aligns by ( in if/while/for. If false, indents by continuationIndentCallSite.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val alignByArrowEnumeratorGenerator: Boolean

    Permalink

    If true, aligns by <- in for comprehensions.

  5. val alignByIfWhileOpenParen: Boolean

    Permalink

    If true, aligns by ( in if/while/for.

    If true, aligns by ( in if/while/for. If false, indents by continuationIndentCallSite.

  6. val alignByOpenParenCallSite: Boolean

    Permalink

    If true AND bin-packing is true, then call-site arguments won't be aligned by the opening parenthesis.

    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)

  7. val alignByOpenParenDefnSite: Boolean

    Permalink
  8. lazy val alignMap: Map[String, Regex]

    Permalink
  9. val alignStripMarginStrings: Boolean

    Permalink

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

  10. val alignTokens: Set[AlignToken]

    Permalink
  11. val allowNewlineBeforeColonInMassiveReturnTypes: Boolean

    Permalink

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

  12. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  13. val binPackArguments: Boolean

    Permalink

    If true, will fit as many arguments on each line, only breaking at commas.

    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.

  14. val binPackDotChains: Boolean

    Permalink

    If true, will fit as many arguments on each line, only breaking at dots.

    If true, will fit as many arguments on each line, only breaking at dots. If false, a either all selects go on the same line or will have one line each.

  15. val binPackParameters: Boolean

    Permalink

    Same as binPackArguments, except for def/class definition parameters.

  16. val binPackParentConstructors: Boolean

    Permalink

    Parent constructors are C and D in "class A extends B with C and D".

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

  17. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. val configStyleArguments: Boolean

    Permalink

    Call-sites where there is a newline after opening ( and newline before closing ).

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

  19. val continuationIndentCallSite: Int

    Permalink

    Indent width for line continuation at call site.

  20. val continuationIndentDefnSite: Int

    Permalink

    Indent width for line continuation at definition/declaration site.

  21. val danglingParentheses: Boolean

    Permalink

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

  22. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  26. val maxColumn: Int

    Permalink

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

  27. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. val noNewlinesBeforeJsNative: Boolean

    Permalink

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

  29. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  31. val reformatDocstrings: Boolean

    Permalink

    If true, reformats docstrings according to @scalaDocs.

  32. val rewriteTokens: Map[String, String]

    Permalink

    Map of tokens to rewrite.

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

  33. val scalaDocs: Boolean

    Permalink

    Only used if @reformatDocstrings is true.

    Only used if @reformatDocstrings is true. If true, reformats docstrings to use scaladoc style docstring, otherwise use javadoc style.

  34. val spaceAfterTripleEquals: Boolean

    Permalink

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

  35. val spacesInImportCurlyBraces: Boolean

    Permalink
  36. val superfluousParensIndent: Int

    Permalink

    Indent width inside unnecessary parentheses.

    Indent width inside unnecessary parentheses. For example: (function( baab) && // indent 4 caab)

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped