I am the author of AtLilyPond package, the Atom highlighter for the LilyPond music typesetting language. Since my original release was for SublimeText, in which grammars are written in JSON and compiled into XML, I followed the conversion avenue to produce the Atom version. The process was not perfectly straightforward, however, because the
apm converter that is bundled with Atom accepts only TextMate bundles, not Sublime Text packages, as input. And even though both editors use the common
.tmLanguage extension for grammar files, they use different data formats to represent a grammar: SublimeText uses JSON and XML, as I mentioned, whereas TextMate uses the obsolete “NextSTEP plist” (a pre-OS X format), which looks like but is not JSON properly speaking. Luckily, I discovered a Python script that automates the conversion from XML to “NextSTEP plist.” The script may be found at this link. It is not perfect—backslashes lost their escaping in the output somehow—but it generally works fine and is tremendously helpful.
Thereafter, with my highlighter converted into “NextSTEP plist” format and thoroughly tested on TextMate, I was able to follow the TextMate-to-Atom process described in the docs without problems.
In your case, considering that XML is extremely cumbersome to manually code in, and that learning a defunct data format such as “NextSTEP plist” would make a mediocre investment of your time, I believe you have two options:
- Follow the procedure I describe above (JSON for SublimeText=>Conversion to “NextSTEP plist” for TextMate=>Conversion to Atom).
- Write your grammar for Atom directly in CoffeeScript.