Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5af56c0

Browse files
Christian Speichpathwave
Christian Speich
authored andcommittedNov 4, 2022
grammar: Don't require lower-case (helix-editor#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>
1 parent c7b0a67 commit 5af56c0

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed
 

‎helix-loader/src/grammar.rs

-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ pub fn get_language(name: &str) -> Result<Language> {
6767
#[cfg(not(target_arch = "wasm32"))]
6868
pub 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

0 commit comments

Comments
 (0)
Please sign in to comment.