mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-15 09:44:22 +00:00
d06ba072a8
* feat: allow printing default and computed config * fix custom modules * actually fix custom modules
26 lines
644 B
Rust
26 lines
644 B
Rust
use crate::config::ModuleConfig;
|
||
|
||
use serde::Serialize;
|
||
use starship_module_config_derive::ModuleConfig;
|
||
|
||
#[derive(Clone, ModuleConfig, Serialize)]
|
||
pub struct CharacterConfig<'a> {
|
||
pub format: &'a str,
|
||
pub success_symbol: &'a str,
|
||
pub error_symbol: &'a str,
|
||
pub vicmd_symbol: &'a str,
|
||
pub disabled: bool,
|
||
}
|
||
|
||
impl<'a> Default for CharacterConfig<'a> {
|
||
fn default() -> Self {
|
||
CharacterConfig {
|
||
format: "$symbol ",
|
||
success_symbol: "[❯](bold green)",
|
||
error_symbol: "[❯](bold red)",
|
||
vicmd_symbol: "[❮](bold green)",
|
||
disabled: false,
|
||
}
|
||
}
|
||
}
|