tweak default config to amplify theme-ability (#4572)

* tweak default config to amplify theme-ability

* missed default of auto
This commit is contained in:
Darren Schroeder
2022-02-20 16:05:36 -06:00
committed by GitHub
parent fd22211737
commit 9b2a022f5b
2 changed files with 56 additions and 22 deletions

View File

@ -185,7 +185,7 @@ pub fn get_color_config(config: &Config) -> HashMap<String, Style> {
// hm.insert("primitive_line".to_string(), Color::White.normal());
// hm.insert("primitive_pattern".to_string(), Color::White.normal());
// hm.insert("primitive_path".to_string(), Color::White.normal());
// hm.insert("separator_color".to_string(), Color::White.normal());
hm.insert("separator".to_string(), Color::White.normal());
hm.insert(
"leading_trailing_space_bg".to_string(),
Style::default().on(Color::Rgb(128, 128, 128)),
@ -292,14 +292,6 @@ pub fn style_primitive(primitive: &str, color_hm: &HashMap<String, Style>) -> Te
}
}
"record" | "list" | "block" => {
let style = color_hm.get(primitive);
match style {
Some(s) => TextStyle::with_style(Alignment::Left, *s),
None => TextStyle::basic_left(),
}
}
"nothing" => {
let style = color_hm.get(primitive);
match style {
@ -337,6 +329,14 @@ pub fn style_primitive(primitive: &str, color_hm: &HashMap<String, Style>) -> Te
}
}
"record" | "list" | "block" => {
let style = color_hm.get(primitive);
match style {
Some(s) => TextStyle::with_style(Alignment::Left, *s),
None => TextStyle::basic_left(),
}
}
// types in nushell but not in engine-q
// "Line" => {
// let style = color_hm.get("Primitive::Line");