support hblang
This commit is contained in:
parent
589649298c
commit
d836f2f145
|
@ -1,3 +1,3 @@
|
|||
[toolchain]
|
||||
channel = "nightly"
|
||||
channel = "nightly-2023-09-17"
|
||||
components = ["rust-src", "llvm-tools"]
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue