2021-03-15 10:40:52 +00:00
|
|
|
|
use crate::config::ModuleConfig;
|
2019-10-04 12:42:33 +00:00
|
|
|
|
|
2021-03-31 15:31:55 +00:00
|
|
|
|
use serde::Serialize;
|
2019-10-04 12:42:33 +00:00
|
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
|
2021-03-31 15:31:55 +00:00
|
|
|
|
#[derive(Clone, ModuleConfig, Serialize)]
|
2019-10-04 12:42:33 +00:00
|
|
|
|
pub struct CharacterConfig<'a> {
|
2020-07-07 22:45:32 +00:00
|
|
|
|
pub format: &'a str,
|
|
|
|
|
pub success_symbol: &'a str,
|
|
|
|
|
pub error_symbol: &'a str,
|
|
|
|
|
pub vicmd_symbol: &'a str,
|
2019-10-04 12:42:33 +00:00
|
|
|
|
pub disabled: bool,
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-15 10:40:52 +00:00
|
|
|
|
impl<'a> Default for CharacterConfig<'a> {
|
|
|
|
|
fn default() -> Self {
|
2019-10-04 12:42:33 +00:00
|
|
|
|
CharacterConfig {
|
2020-07-07 22:45:32 +00:00
|
|
|
|
format: "$symbol ",
|
|
|
|
|
success_symbol: "[❯](bold green)",
|
|
|
|
|
error_symbol: "[❯](bold red)",
|
|
|
|
|
vicmd_symbol: "[❮](bold green)",
|
2019-10-04 12:42:33 +00:00
|
|
|
|
disabled: false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|