All Downloads are FREE. Search and download functionalities are using the official Maven repository.

spells.SpellsConfigModule.scala Maven / Gradle / Ivy

The newest version!
package spells

/** Provides access to the `SpellsConfig` object.
  * Access values from the config like so: `SpellsConfig.terminal.WidthInCharacters.value`.
  * If Scala can infer the type you might drop the `.value` call, thanks to the respective implicit conversions in scope.
  */
trait SpellsConfigModule extends LocationAwareConfigModule with LocationAwarePropertyModule {
  this: StylePrintModule with AnsiModule =>

  object SpellsConfig {
    object `custom-rendering` {
      object display {
        object ShortStackTraceElements extends LocationAwareProperty[Boolean]
      }
    }

    object terminal {
      object WidthInCharacters extends LocationAwareProperty[Int] {
        override def isValid(in: Int): Boolean = in >= 0
        override def customValidationErrorMessage(in: Int): String = s"${location.yellow} must be ${">= 0".yellow}"
      }

      object display {
        object Styles extends LocationAwareProperty[Boolean]
      }
    }

    object xray {
      object report {
        object IgnoredContentKeys extends LocationAwareProperty[List[String]]

        object styles {
          object Description extends LocationAwareProperty[AnsiModule#AnsiStyle]
          object DateTime extends LocationAwareProperty[AnsiModule#AnsiStyle]
          object Duration extends LocationAwareProperty[AnsiModule#AnsiStyle]
          object Location extends LocationAwareProperty[AnsiModule#AnsiStyle]
          object HashCode extends LocationAwareProperty[AnsiModule#AnsiStyle]
          object Thread extends LocationAwareProperty[AnsiModule#AnsiStyle]
          object Class extends LocationAwareProperty[AnsiModule#AnsiStyle]
          object Type extends LocationAwareProperty[AnsiModule#AnsiStyle]
          object Value extends LocationAwareProperty[AnsiModule#AnsiStyle]
        }
      }
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy