Use new default_theme fn for --list-themes

This commit is contained in:
Tau Gärtli committed 2024-08-16 14:13:58 +02:00
1 parent 06b645435a
commit 1b0a6da4be
2 files changed
+12 -3

No files matched your search

+5
View File
@@ -19,6 +19,11 @@ pub const fn default_theme(color_scheme: ColorScheme) -> &'static str {
}
}
/// Detects the color scheme from the terminal.
pub fn color_scheme(when: DetectColorScheme) -> ColorScheme {
detect(when, &TerminalColorSchemeDetector).unwrap_or_default()
}
/// Options for configuring the theme used for syntax highlighting.
/// Used together with [`theme`].
#[derive(Debug, Default, PartialEq, Eq)]