diff --git a/assets/syntaxes.bin b/assets/syntaxes.bin new file mode 100644 index 0000000000..dee29367ce Binary files /dev/null and b/assets/syntaxes.bin differ diff --git a/src/commands/autoview.rs b/src/commands/autoview.rs index b092159829..9a708615b0 100644 --- a/src/commands/autoview.rs +++ b/src/commands/autoview.rs @@ -84,7 +84,9 @@ fn view_text_value(value: &Spanned, source_map: &SourceMap) { use syntect::util::{as_24_bit_terminal_escaped, LinesWithEndings}; // Load these once at the start of your program - let ps = SyntaxSet::load_defaults_newlines(); + let ps: SyntaxSet = syntect::dumps::from_binary(include_bytes!( + "../../assets/syntaxes.bin" + )); if let Some(syntax) = ps.find_syntax_by_extension(extension.to_str().unwrap())