summaryrefslogtreecommitdiffstats
path: root/src/configs/meson.rs
blob: d6b6e20e5655a86eb685a71426f73f172732913c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use serde::{Deserialize, Serialize};

#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(
    feature = "config-schema",
    derive(schemars::JsonSchema),
    schemars(deny_unknown_fields)
)]
#[serde(default)]
pub struct MesonConfig<'a> {
    pub truncation_length: u32,
    pub truncation_symbol: &'a str,
    pub format: &'a str,
    pub symbol: &'a str,
    pub style: &'a str,
    pub disabled: bool,
}

impl<'a> Default for MesonConfig<'a> {
    fn default() -> Self {
        MesonConfig {
            truncation_length: u32::MAX,
            truncation_symbol: "…",
            format: "via [$symbol$project]($style) ",
            symbol: "⬢ ",
            style: "blue bold",
            disabled: false,
        }
    }
}