diff --git a/rust-toolchain.toml b/rust-toolchain.toml index ecc21cc..00e2877 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly" +channel = "nightly-2023-09-17" components = ["rust-src", "llvm-tools"] diff --git a/src/filetype.rs b/src/filetype.rs index 4b6707b..92824a4 100644 --- a/src/filetype.rs +++ b/src/filetype.rs @@ -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() } }