Dynamic Grammar Includes


This may be a bit of a unique issue, but here goes.

I have a package, Tasks, where the grammar is defined and added dynamically. This allows users to customize aspects of the grammar and have it reflect in the syntax highlighting.

The problem i’m experiencing is that i want to be able to support markdown styles in each of the task items. I’ve tried the “include” which you can see in Tasks/lib/tasks.cson with both source.md and source.gfm. My thought is that there is something extra i would need to do in the registration process that might be done automatically in normal cases. You can see the registration stuff here: https://github.com/irrationalistic/atom-tasks/blob/master/lib/tasks.coffee#L96

Is there something that is done automatically for normal syntax grammars that i’m missing here? Any thoughts? Thanks for your help!


To my knowledge, all of the code that handles package lifetime is in:


I realize that’s kind of vague, but I haven’t kept up on all the changes that have been going on in there :confused:

Let me know if you have more questions!


So i may have fixed it by using text.md instead of using source.*! Not 100% it’ll work across all cases, but seems to be working for now :slight_smile: