feat: add Honey syntax highlighting

This commit is contained in:
2026-10-16 20:42:17 +02:00
parent 67b42c0d93
commit 02d1422a04
13 changed files with 1525606 additions and 2 deletions
+12 -1
View File
@@ -118,7 +118,7 @@ fn spec(
}
}
static LANGUAGES: LazyLock<[LanguageSpec; 19]> = LazyLock::new(|| {
static LANGUAGES: LazyLock<[LanguageSpec; 20]> = LazyLock::new(|| {
[
spec(
super::RUST_ID,
@@ -272,6 +272,14 @@ static LANGUAGES: LazyLock<[LanguageSpec; 19]> = LazyLock::new(|| {
tree_sitter_zig::INJECTIONS_QUERY,
"",
),
spec(
"honey",
"Honey",
tree_sitter_honey::LANGUAGE.into(),
tree_sitter_honey::HIGHLIGHTS_QUERY,
"",
"",
),
]
});
@@ -310,6 +318,8 @@ pub(super) fn by_name(name: &str) -> Option<&'static LanguageSpec> {
("cpp", "C++"),
("cxx", "C++"),
("golang", "Go"),
("hon", "Honey"),
("honeylang", "Honey"),
];
let name = ALIASES
.iter()
@@ -365,6 +375,7 @@ fn detect_path(path: &Path) -> Option<&'static LanguageSpec> {
| "tpp" => "C++",
"go" => "Go",
"zig" => "Zig",
"hon" => "Honey",
_ => return None,
}
}