support hblang

This commit is contained in:
able 2024-05-11 18:05:38 -05:00
parent 589649298c
commit d836f2f145
2 changed files with 22 additions and 1 deletions

View file

@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "nightly" channel = "nightly-2023-09-17"
components = ["rust-src", "llvm-tools"] components = ["rust-src", "llvm-tools"]

View file

@ -113,6 +113,27 @@ impl FileType {
}, },
}; };
} }
if file_name.ends_with(".hb") {
return Self {
name: String::from("HBLang"),
hl_opts: HighlightingOptions {
numbers: true,
strings: true,
characters: true,
comments: true,
multiline_comments: true,
primary_keywords: vec![
"if".to_string(),
"else".to_string(),
"return".to_string(),
"loop".to_string(),
"break".to_string(),
],
secondary_keywords: vec![":=".to_string(), "int".to_string()],
},
};
}
Self::default() Self::default()
} }
} }