In tree-sitter-superhtml there's a grammar for SuperHTML templates that can be used by any editor (or tool in general) that relies on Tree Sitter.
Unfortunately, a grammar alone is not enough to get syntax highlighting in an editor, as you also need highlighting queries, and those need to be crafted for each editor.
I've developed the current queries for Helix and they look like this:
Notice in particular how id values of block definitions are underlined differently from other non-semantically-relevant(to the templating engine) ids.
Trying yesterday with a user to add those same queries to Neovim caused an error, which means that Neovim users at the moment cannot have syntax highlighting for .shtml files.
In
tree-sitter-superhtml
there's a grammar for SuperHTML templates that can be used by any editor (or tool in general) that relies on Tree Sitter.Unfortunately, a grammar alone is not enough to get syntax highlighting in an editor, as you also need highlighting queries, and those need to be crafted for each editor.
I've developed the current queries for Helix and they look like this:
Notice in particular how id values of block definitions are underlined differently from other non-semantically-relevant(to the templating engine) ids.
Trying yesterday with a user to add those same queries to Neovim caused an error, which means that Neovim users at the moment cannot have syntax highlighting for .shtml files.