From 717f8e3d8837e14d76825603c0cbdcabb66950ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kat=20March=C3=A1n?= Date: Wed, 22 Sep 2021 12:30:16 -0700 Subject: [PATCH] feat(graphical): add theming customization for linums --- src/handlers/graphical.rs | 2 +- src/handlers/theme.rs | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/handlers/graphical.rs b/src/handlers/graphical.rs index f2965c4..e2c6074 100644 --- a/src/handlers/graphical.rs +++ b/src/handlers/graphical.rs @@ -513,7 +513,7 @@ impl GraphicalReportHandler { write!( f, " {:width$} {} ", - linum.dimmed(), + linum.style(self.theme.styles.linum), self.theme.characters.vbar, width = width )?; diff --git a/src/handlers/theme.rs b/src/handlers/theme.rs index fb4c3fa..e79a605 100644 --- a/src/handlers/theme.rs +++ b/src/handlers/theme.rs @@ -84,6 +84,8 @@ pub struct ThemeStyles { pub help: Style, /// Style to apply to filenames/links/URLs. pub link: Style, + /// Style to apply to line numbers. + pub linum: Style, /// Styles to cycle through (using `.iter().cycle()`), to render the lines /// and text for diagnostic highlights. pub highlights: Vec