forked from extern/nushell
Merge pull request #202 from jonathandturner/add_bat_syntax
Add a more complete syntax file (from bat)
This commit is contained in:
commit
12a785f2a2
BIN
assets/syntaxes.bin
Normal file
BIN
assets/syntaxes.bin
Normal file
Binary file not shown.
@ -84,7 +84,9 @@ fn view_text_value(value: &Spanned<Value>, source_map: &SourceMap) {
|
|||||||
use syntect::util::{as_24_bit_terminal_escaped, LinesWithEndings};
|
use syntect::util::{as_24_bit_terminal_escaped, LinesWithEndings};
|
||||||
|
|
||||||
// Load these once at the start of your program
|
// 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) =
|
if let Some(syntax) =
|
||||||
ps.find_syntax_by_extension(extension.to_str().unwrap())
|
ps.find_syntax_by_extension(extension.to_str().unwrap())
|
||||||
|
Loading…
Reference in New Issue
Block a user