case class Align(openParenCallSite: Boolean = false, openParenDefnSite: Boolean = false, tokens: Set[AlignToken] = Set(AlignToken.caseArrow), arrowEnumeratorGenerator: Boolean = false, ifWhileOpenParen: Boolean = true, tokenCategory: Map[String, String] = Map(), treeCategory: Map[String, String] = Map( "Defn.Val" -> "val/var/def", "Defn.Var" -> "val/var/def", "Defn.Def" -> "val/var/def", "Defn.Class" -> "class/object/trait", "Defn.Object" -> "class/object/trait", "Defn.Trait" -> "class/object/trait", "Enumerator.Generator" -> "for", "Enumerator.Val" -> "for" )) extends Product with Serializable

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 style = 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.

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Align
  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 Align(openParenCallSite: Boolean = false, openParenDefnSite: Boolean = false, tokens: Set[AlignToken] = Set(AlignToken.caseArrow), arrowEnumeratorGenerator: Boolean = false, ifWhileOpenParen: Boolean = true, tokenCategory: Map[String, String] = Map(), treeCategory: Map[String, String] = Map( "Defn.Val" -> "val/var/def", "Defn.Var" -> "val/var/def", "Defn.Def" -> "val/var/def", "Defn.Class" -> "class/object/trait", "Defn.Object" -> "class/object/trait", "Defn.Trait" -> "class/object/trait", "Enumerator.Generator" -> "for", "Enumerator.Val" -> "for" ))

    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 style = 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.

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. implicit val alignReader: ConfDecoder[Set[AlignToken]]
  5. val arrowEnumeratorGenerator: Boolean
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. val ifWhileOpenParen: Boolean
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. val openParenCallSite: Boolean
  17. val openParenDefnSite: Boolean
  18. def productElementNames: Iterator[String]
    Definition Classes
    Product
  19. implicit val reader: ConfDecoder[Align]
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. val tokenCategory: Map[String, String]
  22. val tokens: Set[AlignToken]
  23. val treeCategory: Map[String, String]
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped