PPrinter

pprint.PPrinter
See thePPrinter companion object
case class PPrinter(defaultWidth: Int, defaultHeight: Int, defaultIndent: Int, defaultEscapeUnicode: Boolean, defaultShowFieldNames: Boolean, colorLiteral: Attrs, colorApplyPrefix: Attrs, additionalHandlers: PartialFunction[Any, Tree]) extends Walker

Value parameters

additionalHandlers

Provide this to override how certain types are pretty-printed at runtime

colorApplyPrefix

What color to assign to Foo in Foo(bar, baz)

colorLiteral

What color to assign to literals like "lol" or 31337

defaultHeight

How tall to allow the pretty-printed output to become before truncated it with a ...

defaultIndent

How many spaces to indent each nested Tree.Apply by

defaultWidth

How wide to allow a pretty-printed value to become before wrapping

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Walker
class Object
trait Matchable
class Any
Show all
Known subtypes
object Color.type
Self type

Members list

Type members

Classlikes

object err

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
err.type

Value members

Concrete methods

def apply(x: Any, width: Int, height: Int, indent: Int, initialOffset: Int, escapeUnicode: Boolean, showFieldNames: Boolean): Str

Converts an Any into a large colored fansi.Str

Converts an Any into a large colored fansi.Str

Attributes

def log[T](x: Text[T], tag: String, width: Int, height: Int, indent: Int, escapeUnicode: Boolean, showFieldNames: Boolean)(implicit line: Line, fileName: FileName): T

Logs a given value to stdout with some metadata to identify where the log message came from. Hard-coded and not very flexible, but you can easily implement your own log method if you want to customize it further.

Logs a given value to stdout with some metadata to identify where the log message came from. Hard-coded and not very flexible, but you can easily implement your own log method if you want to customize it further.

Attributes

def pprintln[T](x: T, width: Int, height: Int, indent: Int, initialOffset: Int, escapeUnicode: Boolean, showFieldNames: Boolean): Unit

Converts an Any into a large colored fansi.Str

Converts an Any into a large colored fansi.Str

Attributes

def tokenize(x: Any, width: Int, height: Int, indent: Int, initialOffset: Int, escapeUnicode: Boolean, showFieldNames: Boolean): Iterator[Str]

Converts an Any into an iterator of colored chunks, wrapped at a certain width and truncated at a certain height

Converts an Any into an iterator of colored chunks, wrapped at a certain width and truncated at a certain height

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def treeify(x: Any, escapeUnicode: Boolean, showFieldNames: Boolean): Tree

Attributes

Inherited from:
Walker

Inherited fields

val tuplePrefix: String

Attributes

Inherited from:
Walker