Copyright | (c) Eric Mertens, 2016 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
This module defines the top-level configuration information for the client.
- data Configuration = Configuration {
- _configDefaults :: ServerSettings
- _configServers :: HashMap Text ServerSettings
- _configPalette :: Palette
- _configWindowNames :: Text
- _configExtraHighlights :: HashSet Identifier
- _configNickPadding :: Maybe Integer
- _configConfigPath :: Maybe FilePath
- _configMacros :: Recognizer Macro
- _configExtensions :: [FilePath]
- _configUrlOpener :: Maybe FilePath
- _configIgnores :: HashSet Identifier
- _configActivityBar :: Bool
- data ConfigurationFailure
- configDefaults :: Lens' Configuration ServerSettings
- configServers :: Lens' Configuration (HashMap Text ServerSettings)
- configPalette :: Lens' Configuration Palette
- configWindowNames :: Lens' Configuration Text
- configNickPadding :: Lens' Configuration (Maybe Integer)
- configConfigPath :: Lens' Configuration (Maybe FilePath)
- configMacros :: Lens' Configuration (Recognizer Macro)
- configExtensions :: Lens' Configuration [FilePath]
- configExtraHighlights :: Lens' Configuration (HashSet Identifier)
- configUrlOpener :: Lens' Configuration (Maybe FilePath)
- configIgnores :: Lens' Configuration (HashSet Identifier)
- configActivityBar :: Lens' Configuration Bool
- loadConfiguration :: Maybe FilePath -> IO (Either ConfigurationFailure Configuration)
- resolveConfigurationPath :: FilePath -> IO FilePath
Configuration type
data Configuration Source #
Top-level client configuration information. When connecting to a
server configuration from _configServers
is used where possible,
otherwise _configDefaults
is used.
Configuration | |
|
data ConfigurationFailure Source #
Failure cases when loading a configuration file.
ConfigurationReadFailed String | Error message from reading configuration file |
ConfigurationParseFailed String | Error message from parser or lexer |
ConfigurationMalformed String | Error message from loading parsed configuration |
Show ConfigurationFailure Source # | |
Exception ConfigurationFailure Source # | default instance |
Lenses
Loading configuration
:: Maybe FilePath | path to configuration file |
-> IO (Either ConfigurationFailure Configuration) |
Load the configuration file defaulting to ~.glircconfig
.