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 <cspeich@emlix.com>
  • Loading branch information
Christian Speich authored and Frederik Vestre committed Feb 6, 2023
1 parent 5d5818d commit 6f1d3dd
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 6f1d3dd

Please sign in to comment.