From 04c2d5370bd36d463af31d1fc77653780498b6be Mon Sep 17 00:00:00 2001 From: Mica White Date: Sun, 7 Dec 2025 23:45:08 -0500 Subject: Support more languages and themes --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 50bc5a9..9cda2d6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,14 +1,16 @@ use std::io::Read; use std::path::PathBuf; +use syntect::dumps::{from_binary, from_uncompressed_data}; use syntect::highlighting::ThemeSet; use syntect::html::highlighted_html_for_string; use syntect::parsing::SyntaxSet; fn main() { - let syntax_set = SyntaxSet::load_defaults_newlines(); - let theme_set = ThemeSet::load_defaults(); - let mut theme = theme_set.themes["InspiredGitHub"].clone(); + let syntax_set: SyntaxSet = + from_uncompressed_data(include_bytes!("../assets/newlines.packdump")).unwrap(); + let theme_set = from_binary::(include_bytes!("../assets/themepack.themedump")); + let mut theme = theme_set.themes["Catppuccin Latte"].clone(); theme.settings.background = None; let filename = std::env::args().nth(1).map(PathBuf::from); -- cgit v1.2.3