1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-07 19:10:47 +00:00
starship/src/configs/nodejs.rs
t-mangoe 89588a7391
feat(nodejs): check node engines version in package.json (#1847)
* check node engines version in package.json

* fix code, following review.
2020-12-05 12:25:48 +01:00

25 lines
606 B
Rust

use crate::config::{ModuleConfig, RootModuleConfig};
use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig)]
pub struct NodejsConfig<'a> {
pub format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub disabled: bool,
pub not_capable_style: &'a str,
}
impl<'a> RootModuleConfig<'a> for NodejsConfig<'a> {
fn new() -> Self {
NodejsConfig {
format: "via [$symbol$version]($style) ",
symbol: "",
style: "bold green",
disabled: false,
not_capable_style: "bold red",
}
}
}