2021-04-20 16:31:47 +00:00
|
|
|
use crate::config::ModuleConfig;
|
|
|
|
|
|
|
|
use serde::Serialize;
|
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
|
|
|
#[derive(Clone, ModuleConfig, Serialize)]
|
|
|
|
pub struct RedConfig<'a> {
|
|
|
|
pub format: &'a str,
|
2021-08-15 19:30:58 +00:00
|
|
|
pub version_format: &'a str,
|
2021-04-20 16:31:47 +00:00
|
|
|
pub symbol: &'a str,
|
|
|
|
pub style: &'a str,
|
|
|
|
pub disabled: bool,
|
|
|
|
pub detect_extensions: Vec<&'a str>,
|
|
|
|
pub detect_files: Vec<&'a str>,
|
|
|
|
pub detect_folders: Vec<&'a str>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> Default for RedConfig<'a> {
|
|
|
|
fn default() -> Self {
|
|
|
|
RedConfig {
|
|
|
|
format: "via [$symbol($version )]($style)",
|
2021-08-15 19:30:58 +00:00
|
|
|
version_format: "v${raw}",
|
2021-04-20 16:31:47 +00:00
|
|
|
symbol: "🔺 ",
|
|
|
|
style: "red bold",
|
|
|
|
disabled: false,
|
|
|
|
detect_extensions: vec!["red", "reds"],
|
|
|
|
detect_files: vec![],
|
|
|
|
detect_folders: vec![],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|