Function two_face::syntax::extra_newlines

source ·
pub fn extra_newlines() -> SyntaxSet
Expand description

Akin to SyntaxSet::load_defaults_newlines(), but with extra syntax definitions

§Example

// TOML and TypeScript and Dockerfiles oh my!
let syn_set = two_face::syntax::extra_newlines();
let toml = syn_set.find_syntax_by_name("TOML").unwrap();
let type_script = syn_set.find_syntax_by_name("TypeScript").unwrap();
let dockerfile = syn_set.find_syntax_by_name("Dockerfile").unwrap();