summaryrefslogtreecommitdiffstats
path: root/src/configs/git_metrics.rs
blob: f3e52e200dd2635e0233f5d7d4e85517a08178f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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,
        }
    }
}