grammar: Don't require lower-case (#4346)
Currently we always lower-case the grammar name when loading it. While it
is somewhat of an convention to name tree-sitter grammars in lowercase
there is no rule to enforce it.
This patch removes the lower-casing to allow all possible grammar names.
Signed-off-by: Christian Speich <cspeich@emlix.com>
commit4b85aeb2b68c0aaf2338d3e0d0ad4daff13a7baf
authorChristian Speich <cspeich@emlix.com>
dateWed 19 Oct 2022, 10:13 (4 years ago)
parent34389e1
helix-loader/src/grammar.rs−1
@@ -67,7 +67,6 @@ pub fn get_language(name: &str) -> Result<Language> {
6767#[cfg(not(target_arch = "wasm32"))]
6868pub fn get_language(name: &str) -> Result<Language> {
6969 use libloading::{Library, Symbol};
70− let name = name.to_ascii_lowercase();
7170 let mut library_path = crate::runtime_dir().join("grammars").join(&name);
7271 library_path.set_extension(DYLIB_EXTENSION);
7372