-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove lower-case requirement for language/grammar #4362
Remove lower-case requirement for language/grammar #4362
Conversation
One more to remove here: Line 17 in 418a622
|
5a06fff
to
1956564
Compare
Ah thanks. I've removed the missing to lowercase. Two of the tests actually used this lowercase conversion. I've simply changed them. I've also checked |
1956564
to
0e029e0
Compare
I missed this in the review of the PR that added it but there's a real test failure now from the uppercasing on this line: helix/helix-core/src/syntax.rs Line 2278 in e25af1f
|
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]>
Just like for grammars we currently force a lower-case of the name for some actions (like filesystem lookup). To make this consistent and less surprising for users, we remove this lower-casing here. Note: it is still the preferred way to name both language and grammar in lower-case Signed-off-by: Christian Speich <[email protected]>
0e029e0
to
66ccfcc
Compare
Sure, I rebased the PR and lowercased the failing test. |
Thanks! |
As described in #4346 both language and grammar names are sometimes lower-cased. For grammars this is incompatible with ones using uppercase names. And for languages this can be a bit surprising. (At least I stumbled across helix ignoring my queries because of this).
Note that the syntax part is not strictly necessary to get grammars as described in the issue to work.
Closes #4346