mre / prettyprint

Beautifully formatted output for your terminal 🌈
Apache License 2.0
200 stars 10 forks source link

Load custom syntaxes.bin or themes.bin #19

Closed DrSensor closed 5 years ago

DrSensor commented 5 years ago

I happen need this capability for my personal project 🥺

let print = PrettyPrinter::default().language("mylang")
    .load_syntax(include_bytes!("./syntaxset_that_include_mylang.bin").to_vec())
    .build()?;

print.string(CODE)?;
mre commented 5 years ago

Code looked good to me so I went ahead and merged it. Thanks for the PR @DrSensor.