diff options
| author | Mica White <botahamec@outlook.com> | 2025-12-07 23:45:08 -0500 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2025-12-07 23:45:08 -0500 |
| commit | 04c2d5370bd36d463af31d1fc77653780498b6be (patch) | |
| tree | 81b598adad2aa58e108f6979b31f37574f92646d /src | |
| parent | f15fc62034cab450dc8b6ccd39bfb49b6b205005 (diff) | |
Support more languages and themes
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 8 |
1 files changed, 5 insertions, 3 deletions
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::<ThemeSet>(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); |
