How to Extend the HTML Syntax Theme?


I’m looking to add some SSI elements to the HTML syntax theme and would love to know if it’s possible to extend the HTML syntax theme without having to include it into my package.

It’d require identifying a new tag <!--# and elements (set, echo, include, etc) appropriately. But it all lives within HTML, a file is never pure SSI. Again, I don’t want to have to include my own version of HTML tags.

I’m familiar and comfortable working with JS and CSS, But I’m not sure where to start. Any advice would be greatly appreciated.


I’m not familiar with SSI, but I guess an example would be:

<!--#include file="footer.html" -->

Currently it gets rendered as a normal HTML comment:

To be able to select the <!--# part, you might could try to extend the HTML language package and add a SSI specific grammar. Then syntax themes will colorize it.


Thanks for the guide! I found the atom-handlebars syntax helper to be an excellent guide in this process. I’ve got a rough version up and running already :slight_smile: