mirror of
https://github.com/Llewellynvdm/starship.git
synced 2025-01-07 07:54:57 +00:00
d06ba072a8
* feat: allow printing default and computed config * fix custom modules * actually fix custom modules
28 lines
650 B
Rust
28 lines
650 B
Rust
use crate::config::ModuleConfig;
|
|
|
|
use serde::Serialize;
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
#[derive(Clone, ModuleConfig, Serialize)]
|
|
pub struct ShLvlConfig<'a> {
|
|
pub threshold: i64,
|
|
pub format: &'a str,
|
|
pub symbol: &'a str,
|
|
pub repeat: bool,
|
|
pub style: &'a str,
|
|
pub disabled: bool,
|
|
}
|
|
|
|
impl<'a> Default for ShLvlConfig<'a> {
|
|
fn default() -> Self {
|
|
ShLvlConfig {
|
|
threshold: 2,
|
|
format: "[$symbol$shlvl]($style) ",
|
|
symbol: "↕️ ", // extra space for emoji
|
|
repeat: false,
|
|
style: "bold yellow",
|
|
disabled: true,
|
|
}
|
|
}
|
|
}
|