-
Notifications
You must be signed in to change notification settings - Fork 3
Configuration
Spells uses typesafe's config library. It looks for the default configuration files like reference.conf
or application.conf
etc. However, these only allow a "per application" level of configuration. Spells goes a step further and allows a "per user" configuration. Simply copy the reference.conf file into your home folder and rename it to .spells.conf
.
The fallback chain is thus as follows: .spells.conf
➡️ application.conf
➡️ reference.conf
.
It is possible to access the configuration values programmatically, by replacing spells
with SpellsConfig
and calling def value
:
spells {
terminal {
WidthInCharacters = 160
}
}
val width: Int = SpellsConfig.terminal.WidthInCharacters.value
Note: the type can be inferred, but is left for demonstration purposes.
The defaults can be found in the reference.conf file and the Configuration wiki page shows how to override as well as retrieve them programmatically.