diff --git a/gengo/build.rs b/gengo/build.rs index 3fe29714..f569b463 100644 --- a/gengo/build.rs +++ b/gengo/build.rs @@ -52,6 +52,7 @@ fn main() -> Result<(), Box> { let category = match category { "data" => "Data", "markup" => "Markup", + "pattern" => "Pattern", "programming" => "Programming", "prose" => "Prose", "query" => "Query", diff --git a/gengo/languages.yaml b/gengo/languages.yaml index db255b72..68ff7b46 100644 --- a/gengo/languages.yaml +++ b/gengo/languages.yaml @@ -68,7 +68,7 @@ ABAP: extensions: - abap ABNF: - category: data + category: pattern color: "#ABFABF" matchers: extensions: @@ -766,7 +766,7 @@ Raku: - perl6 - raku Regex: - category: data + category: pattern color: "#44E03F" nerd-font-glyph: "\U0000eb38" matchers: diff --git a/gengo/src/language/mod.rs b/gengo/src/language/mod.rs index a5527816..1f218372 100644 --- a/gengo/src/language/mod.rs +++ b/gengo/src/language/mod.rs @@ -228,6 +228,8 @@ pub enum Category { Data, /// Markup languages. Examples: HTML, Pug, etc. Markup, + /// Languages that define text patterns. Examples: Regex, ABNF, etc. + Pattern, /// Programming languages. Examples: Rust, C, C++, Java, etc. Programming, /// Prose. Examples: Plain text, Markdown, etc. diff --git a/gengo/src/lib.rs b/gengo/src/lib.rs index 18bc2752..e0309c7d 100644 --- a/gengo/src/lib.rs +++ b/gengo/src/lib.rs @@ -114,7 +114,7 @@ impl FileSource<'fs>> Gengo { let detectable = match language.category() { Category::Data | Category::Prose => false, - Category::Programming | Category::Markup | Category::Query => { + Category::Pattern | Category::Programming | Category::Markup | Category::Query => { !(generated || documentation || vendored) } };