You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
Now, the above grammar won't do anything because grammar rules added using the injections method are added to the end of the rule stack which gives them the lower priority of all of the rules. However, from what I understand about the Textmate grammar engine, one should be able to modify the scope selector from 'source.grammar-test': to 'L:source.grammar-test': to add it to the start of the stack giving it the highest priority (I believe the L: means left, I've seen both L: and R:). Sadly, adding either of these prefixes appears to have no effect. Removing the original comment grammar one can verify the injected grammar is indeed added to the rules with or without the prefix, it just don't have any effect on the priority. Am I interpreting this correctly? Is there a way of altering the injected grammars priority?
The text was updated successfully, but these errors were encountered:
@nathansobo is that something the team would consider? Being able to enhance existing language-* packs with specific scopes instead of having to fork (and always maintain that fork) and then add your stuff is a bit annoying.
Currently grammar can be injected into existing rules using the
injections
region as inNow, the above grammar won't do anything because grammar rules added using the
injections
method are added to the end of the rule stack which gives them the lower priority of all of the rules. However, from what I understand about the Textmate grammar engine, one should be able to modify the scope selector from'source.grammar-test':
to'L:source.grammar-test':
to add it to the start of the stack giving it the highest priority (I believe theL:
means left, I've seen bothL:
andR:
). Sadly, adding either of these prefixes appears to have no effect. Removing the original comment grammar one can verify the injected grammar is indeed added to the rules with or without the prefix, it just don't have any effect on the priority. Am I interpreting this correctly? Is there a way of altering the injected grammars priority?The text was updated successfully, but these errors were encountered: