How can I create new Keywords to a syntax?


#1

Hey, I’m working on giving atom support to autocomplete and highlight PHPUnit test tools, I’ve worked on DocBlockr to autocomplete docs and now I’m facing a issue on highlighting the PHPUnits keywords, such as @test and @depends. Since it’s not a keyword in language-php, it doesn’t highlight on my doc comment block (/** */) and I cant figure it out where can I register those and more words to be highlighted in atom.

What shall I do? Create a new language? Edit the existing language-php? How can I edit language-php and other core packages?
Sorry if this is noobish question but I googled and searched everywhere here and i had no luck…

Thanks!


#2

As mentioned in a long ago post, you could create an “injection grammar” like the language-todo package that adds support for those keywords into PHP code while still being a separate package.