Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/languages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,18 @@ macro_rules! l {
}

// The array is sorted by the extension name
pub(crate) const LANGUAGES: [(&str, Language); 58] = [
pub(crate) const LANGUAGES: &[(&str, Language)] = &[
l!("bat", "Batch", "batch"),
l!("c", "C", "c"),
l!("cc", "C++", "cpp"),
l!("cjs", "JavaScript", "javascript"),
l!("cl", "Common Lisp", "common-lisp"),
l!("clj", "Clojure", "clojure"),
l!("comp", "GLSL", "glsl"),
l!("cpp", "C++", "cpp"),
l!("cs", "C#", "csharp"),
l!("css", "CSS", "css"),
l!("cts", "TypeScript", "typescript"),
l!("cxx", "C++", "cpp"),
l!("dart", "Dart", "dart"),
l!("frag", "GLSL", "glsl"),
Expand All @@ -41,7 +43,11 @@ pub(crate) const LANGUAGES: [(&str, Language); 58] = [
l!("kt", "Kotlin", "kotlin"),
l!("less", "Less", "less"),
l!("lua", "Lua", "lua"),
l!("m", "Objective-C", "objective-c"),
l!("md", "Markdown", "markdown"),
l!("mjs", "JavaScript", "javascript"),
l!("mm", "Objective-C", "objective-c"),
l!("mts", "TypeScript", "typescript"),
l!("pl", "Perl", "perl"),
l!("py", "Python", "python"),
l!("pyc", "Python", "python"),
Expand All @@ -55,13 +61,17 @@ pub(crate) const LANGUAGES: [(&str, Language); 58] = [
l!("scss", "SCSS", "scss"),
l!("sh", "Shell", "shell"),
l!("sql", "SQL", "sql"),
l!("sv", "System Verilog", "system-verilog"),
l!("svh", "System Verilog", "system-verilog"),
l!("swift", "Swift", "swift"),
l!("tesc", "GLSL", "glsl"),
l!("tese", "GLSL", "glsl"),
l!("tex", "TeX", "tex"),
l!("toml", "TOML", "toml"),
l!("ts", "TypeScript", "typescript"),
l!("v", "Verilog", "verilog"),
l!("vert", "GLSL", "glsl"),
l!("vh", "Verilog", "verilog"),
l!("xhtml", "XHTML", "xhtml"),
l!("xml", "XML", "xml"),
l!("yaml", "YAML", "yaml"),
Expand Down