2022-03-26 10:42:19 +01:00
|
|
|
use serde::{Deserialize, Serialize};
|
2021-03-28 18:48:15 +03:00
|
|
|
|
2022-03-26 10:42:19 +01:00
|
|
|
#[derive(Clone, Deserialize, Serialize)]
|
2022-04-01 17:14:05 +02:00
|
|
|
#[cfg_attr(feature = "config-schema", derive(schemars::JsonSchema))]
|
2022-03-26 10:42:19 +01:00
|
|
|
#[serde(default)]
|
2021-03-28 18:48:15 +03:00
|
|
|
pub struct VcshConfig<'a> {
|
|
|
|
|
pub symbol: &'a str,
|
|
|
|
|
pub style: &'a str,
|
|
|
|
|
pub format: &'a str,
|
|
|
|
|
pub disabled: bool,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<'a> Default for VcshConfig<'a> {
|
|
|
|
|
fn default() -> Self {
|
|
|
|
|
VcshConfig {
|
|
|
|
|
symbol: "",
|
|
|
|
|
style: "bold yellow",
|
|
|
|
|
format: "vcsh [$symbol$repo]($style) ",
|
|
|
|
|
disabled: false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|