Repository navigation
Allow including repository patterns from other grammars - #53
Conversation
|
cc @nathansobo, @kevinsawicki (forgive me if I got the wrong people :P) Would you guys be OK with this? This makes it a lot easier to share features between complex grammars. |
Yeah, this is pretty cool, and if TextMate supports it then it should be supported here. Thanks for opening this up, I think we'll be able to review this next week. |
There was a problem hiding this comment.
I think it might be good to still call this line with the root scope name (the text before the #). This allows the tokenizer to re-run when a dependent grammar is loaded since grammars are loaded asynchronously.
|
Good point. Added a call to |
|
@kevinsawicki any other comments? :) |
Allow including repository patterns from other grammars
|
Nope, looks good, thanks for adding this. |
|
Published in 4.2.0, this will be included in the next release of Atom, 1.0.6 |
|
🎆 |
TextMate 2 supports the "grammarB#rule" syntax for including a pattern from grammarB's "repository" section. (e.g. https://github.com/textmate/bundle-development.tmbundle/blob/master/Syntaxes/Language%20Grammar.tmLanguage#L1631)
This adds similar functionality to first-mate.