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
42 lines
1.0 KiB
Rust
42 lines
1.0 KiB
Rust
use crate::config::ModuleConfig;
|
|
|
|
use serde::Serialize;
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
#[derive(Clone, ModuleConfig, Serialize)]
|
|
pub struct GitStatusConfig<'a> {
|
|
pub format: &'a str,
|
|
pub style: &'a str,
|
|
pub stashed: &'a str,
|
|
pub ahead: &'a str,
|
|
pub behind: &'a str,
|
|
pub diverged: &'a str,
|
|
pub conflicted: &'a str,
|
|
pub deleted: &'a str,
|
|
pub renamed: &'a str,
|
|
pub modified: &'a str,
|
|
pub staged: &'a str,
|
|
pub untracked: &'a str,
|
|
pub disabled: bool,
|
|
}
|
|
|
|
impl<'a> Default for GitStatusConfig<'a> {
|
|
fn default() -> Self {
|
|
GitStatusConfig {
|
|
format: "([\\[$all_status$ahead_behind\\]]($style) )",
|
|
style: "red bold",
|
|
stashed: "\\$",
|
|
ahead: "⇡",
|
|
behind: "⇣",
|
|
diverged: "⇕",
|
|
conflicted: "=",
|
|
deleted: "✘",
|
|
renamed: "»",
|
|
modified: "!",
|
|
staged: "+",
|
|
untracked: "?",
|
|
disabled: false,
|
|
}
|
|
}
|
|
}
|