From 07e7e7534d3fe71a6bf9c118442822c8b77ce6a2 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 4 Dec 2024 10:24:42 -0500 Subject: [PATCH] theme: Include key names in style parsing warnings This should make it easier to figure out why the theme-check CI job fails. Previously the message didn't include the failing key so you were left searching or guessing where the error occurred. --- helix-view/src/theme.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-view/src/theme.rs b/helix-view/src/theme.rs index 9dc326444..fca47413c 100644 --- a/helix-view/src/theme.rs +++ b/helix-view/src/theme.rs @@ -280,7 +280,7 @@ fn build_theme_values( for (name, style_value) in values { let mut style = Style::default(); if let Err(err) = palette.parse_style(&mut style, style_value) { - warnings.push(err); + warnings.push(format!("Failed to parse style for key {name:?}. {err}")); } // these are used both as UI and as highlights