Skip to content

Commit

Permalink
grammar: Don't require lower-case (helix-editor#4346)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Christian Speich authored and Shekhinah Memmel committed Dec 11, 2022
1 parent 92e0665 commit c7f81c2
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion helix-loader/src/grammar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ pub fn get_language(name: &str) -> Result<Language> {
#[cfg(not(target_arch = "wasm32"))]
pub fn get_language(name: &str) -> Result<Language> {
use libloading::{Library, Symbol};
let name = name.to_ascii_lowercase();
let mut library_path = crate::runtime_dir().join("grammars").join(&name);
library_path.set_extension(DYLIB_EXTENSION);

Expand Down

0 comments on commit c7f81c2

Please sign in to comment.