2020-07-08 06:45:32 +08:00
|
|
|
use crate::config::{ModuleConfig, RootModuleConfig};
|
2019-10-19 09:51:38 +08:00
|
|
|
|
|
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
|
|
|
|
|
#[derive(Clone, ModuleConfig)]
|
|
|
|
|
pub struct NodejsConfig<'a> {
|
2020-07-08 06:45:32 +08:00
|
|
|
pub format: &'a str,
|
|
|
|
|
pub symbol: &'a str,
|
|
|
|
|
pub style: &'a str,
|
2019-10-19 09:51:38 +08:00
|
|
|
pub disabled: bool,
|
2020-12-05 20:25:48 +09:00
|
|
|
pub not_capable_style: &'a str,
|
2019-10-19 09:51:38 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl<'a> RootModuleConfig<'a> for NodejsConfig<'a> {
|
|
|
|
|
fn new() -> Self {
|
|
|
|
|
NodejsConfig {
|
2020-07-08 06:45:32 +08:00
|
|
|
format: "via [$symbol$version]($style) ",
|
|
|
|
|
symbol: "⬢ ",
|
|
|
|
|
style: "bold green",
|
2019-10-19 09:51:38 +08:00
|
|
|
disabled: false,
|
2020-12-05 20:25:48 +09:00
|
|
|
not_capable_style: "bold red",
|
2019-10-19 09:51:38 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|