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
- Commands
Config - 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.
- Editor
Error - Error opening a configured editor/pager
- Http
Engine Config - Configuration for the engine that handles HTTP requests
- Input
Binding - One or more key combinations, which should correspond to a single action
- Input
Map - Mapping of actions to input bindings
- KeyCombination
- Key input sequence, which can trigger an action
- Mime
Override Map - 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.
- Config
Error - Error creating or loading a config file
Functions§
- deserialize_
tui_ config - Deserialize TUI-specific config fields from an existing deserializer