1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-26 11:42:36 +00:00
starship/src/configs/git_metrics.rs

24 lines
594 B
Rust
Raw Normal View History

use crate::config::ModuleConfig;
use serde::Serialize;
use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig, Serialize)]
pub struct GitMetricsConfig<'a> {
pub added_style: &'a str,
pub deleted_style: &'a str,
pub format: &'a str,
pub disabled: bool,
}
impl<'a> Default for GitMetricsConfig<'a> {
fn default() -> Self {
GitMetricsConfig {
added_style: "bold green",
deleted_style: "bold red",
format: "[+$added]($added_style) [-$deleted]($deleted_style) ",
disabled: true,
}
}
}