On 15/8/2006, at 21:03, Rob McBroom wrote:
[...] Or perhaps a better question: I had added my new scope to the PHP grammar, but I'd really like the behavior in all "text" and "source" contexts. My searching of the archives led me to some discussions of applying a snippet to all scopes, but how can I add a scope to all languages (without missing out on updates)?
There is currently no good way to do that.
If the language is “stand alone” (i.e. not included by a parent language) then one can often create a new language and let that new language define the additional rules and include the original grammar.
There is however a very clear need for more flexibility in this respect, and I am contemplating a system both using base grammars (shared by all languages) and the scope injection which has been mentioned a few times in the past (to inject a sub-grammar into a given scope.)
As for the delta files: these do not have the granularity of storing only changes to single rules, as that can’t be merged without potential conflicts when the default grammar is updated.