Skip to main content

Crate slumber_config

Crate slumber_config 

Source
Expand description

App configuration. Some config fields apply to core functionality, while some are interface-specific. While it’s maybe not the “best” design, we compile them all into one crate to give consistent behavior between the CLI and TUI. Specifically, it allows the slumber config command to show exactly what the TUI is actually using.

The downside of this is we have to pull in some types that are specific to the TUI, because they relate to configuration. By putting this in a separate crate, instead of the core crate, it at least pushes those dependencies down the compile chain a bit further.

This crate is not semver compliant. The version is locked to the root slumber crate version. If you choose to depend directly on this crate, you do so at your own risk of breakage.

Structs§

Color
ANSI color code
CommandsConfig
Configuration for in-app query and export commands
Config
App-level configuration, which is global across all sessions and collections. This is not meant to modifiable during a session. If changes are made to the config file while a TUI session is running, they won’t be picked up until the app restarts.
EditorError
Error opening a configured editor/pager
HttpEngineConfig
Configuration for the engine that handles HTTP requests
InputBinding
One or more key combinations, which should correspond to a single action
InputMap
Mapping of actions to input bindings
KeyCombination
Key input sequence, which can trigger an action
MimeOverrideMap
A map of MIME types overridden by the user
Syntax
User-configurable visual settings for syntax highlighting.
Theme
User-configurable visual settings. These are used to generate the full style set.
TuiConfig
Configuration specific to the TUI

Enums§

Action
An input action from the user. This is context-agnostic; the action may not actually mean something in the current app context. This type is just an abstraction to map all possible input events to the things we actually care about handling.
ConfigError
Error creating or loading a config file

Functions§

deserialize_tui_config
Deserialize TUI-specific config fields from an existing deserializer