Tree-sitter grammar for Hygen templates.
It extends the tree-sitter-embedded-template
grammar.
embedded-template
: highlight ofejs
tagsbash
(optional): highlight ofmetadata.value
whenmetadata.key
issh
javascript
(optional): highlight ofcode
nodes- Any other parser that you want to use for dynamic injection
hygen.nvim
: plugin that integrates this grammar to yourNeovim
configuration.
To be added
To be added
You can get the built files from the release
branch. If you
have specific instructions for your editor, PR's are welcome.
Thanks to content
node of tree-sitter-embedded-template
grammar, dynamic injections can be attached to
template body.
To make it easier to understand which parser
will be injected and which
filetype is used in template body
, the following pattern is recommended to
implement this grammar:
<file-name>.(ext).hygen
To implement dynamic injection, is recommended to create a predicate/directive with the following name:
#inject-hygen-tmpl!
Note
The creation of this predicate/directive varies for each editor