diff --git a/src/highlighting/theme_load.rs b/src/highlighting/theme_load.rs index ca1a7d1..420085c 100644 --- a/src/highlighting/theme_load.rs +++ b/src/highlighting/theme_load.rs @@ -300,7 +300,7 @@ impl ParseSettings for Theme { _ => return Err(IncorrectSyntax), }; let mut iter = items.into_iter(); - let settings = match iter.next() { + let mut settings = match iter.next() { Some(Settings::Object(mut obj)) => { match obj.remove("settings") { Some(settings) => ThemeSettings::parse_settings(settings)?, @@ -309,6 +309,15 @@ impl ParseSettings for Theme { } _ => return Err(UndefinedSettings), }; + if let Some(Settings::Object(obj)) = obj.remove("gutterSettings") { + for (key, value) in obj { + match &key[..] { + "background" => settings.gutter = Color::parse_settings(value).ok(), + "foreground" => settings.gutter_foreground = Color::parse_settings(value).ok(), + _ => (), + } + } + } let mut scopes = Vec::new(); for json in iter { // TODO option to disable best effort parsing and bubble up warnings