I am using a homegrown template system that I developed for Scala based framework. So there is no link to point you toward.
If the HTML grammar would simply allow tag snames that begin with a prefix followed by a colon that would be sufficient.
I see that there are rules in the grammar with the scope names 'meta.tag.custom.start.html' and 'meta.tag.custom.end.html'
Could those rules be modified to include these types of tag names without causing problems elsewhere?
If so, I think that would do the trick.