2020-07-09 19:40:33 +00:00
|
|
|
use crate::config::{ModuleConfig, RootModuleConfig};
|
|
|
|
|
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
|
|
|
#[derive(Clone, ModuleConfig)]
|
|
|
|
pub struct CMakeConfig<'a> {
|
|
|
|
pub format: &'a str,
|
|
|
|
pub symbol: &'a str,
|
|
|
|
pub style: &'a str,
|
|
|
|
pub disabled: bool,
|
2021-02-13 10:38:47 +00:00
|
|
|
pub detect_extensions: Vec<&'a str>,
|
|
|
|
pub detect_files: Vec<&'a str>,
|
|
|
|
pub detect_folders: Vec<&'a str>,
|
2020-07-09 19:40:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
impl<'a> RootModuleConfig<'a> for CMakeConfig<'a> {
|
|
|
|
fn new() -> Self {
|
|
|
|
CMakeConfig {
|
2021-01-16 12:27:02 +00:00
|
|
|
format: "via [$symbol($version )]($style)",
|
2020-10-13 22:01:35 +00:00
|
|
|
symbol: "喝 ",
|
2020-07-09 19:40:33 +00:00
|
|
|
style: "bold blue",
|
|
|
|
disabled: false,
|
2021-02-13 10:38:47 +00:00
|
|
|
detect_extensions: vec![],
|
|
|
|
detect_files: vec!["CMakeLists.txt", "CMakeCache.txt"],
|
|
|
|
detect_folders: vec![],
|
2020-07-09 19:40:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|