Skip to main content

tree-sitter-hygen-template

CI discord matrix crates npm pypi

Tree-sitter grammar for Hygen templates.

It extends the tree-sitter-embedded-template grammar.

Parser requirements

  • bash (optional): highlight of metadata.value when metadata.key is sh
  • javascript (optional): highlight of code nodes
  • regex (optional): highlight of metadata.value when metadata.key is after, before or skip_if
  • Any other parser that you want to use for dynamic injection

Usage in Editors

Neovim

  • hygen.nvim: plugin that integrates this grammar to your Neovim configuration.

Helix

To be added

Emacs

To be added

In General

You can get the built files from the release branch. If you have specific instructions for your editor, PR's are welcome.

Dynamic Injection

Thanks to content node of tree-sitter-embedded-template grammar, dynamic injections can be attached to template body.

File naming convention

Just add .hygen to the end of the file name, i.e.:

  • index.html.hygen
  • .gitignore.hygen
  • .tsconfig.json.hygen

Tree-sitter directive

To implement dynamic injection, is recommended to create a directive with the following name:

#inject-hygen-tmpl!

This directive will the responsible to remove .hygen from the file name and use the rest of the file name to retrieve the parser to be used for dynamic injection. See implementations for more details.

Once created, add it to the end of injections.scm file that will be used by the editor:

; dynamic injection
((content) @injection.content
  (#inject-hygen-tmpl! "")
  (#set! injection.combined))

Implementations

hygen.nvim

References

Metadata

Release files for tree-sitter-hygen-template 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tree-sitter-hygen-template 0.5.0
File Size Uploaded
tree_sitter_hygen_template-0.5.0.tar.gz 11.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for tree-sitter-hygen-template 0.5.0
File
tree_sitter_hygen_template-0.5.0-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
tree_sitter_hygen_template-0.5.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
tree_sitter_hygen_template-0.5.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details
tree_sitter_hygen_template-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details
tree_sitter_hygen_template-0.5.0-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64, Linux glibc 2.5+ x86-64 Details
tree_sitter_hygen_template-0.5.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details
tree_sitter_hygen_template-0.5.0-cp39-abi3-macosx_10_9_x86_64.whl CPython 3.9 abi3 macOS 10.9+ x86-64 Details

Total release size: 130.4 kB

Release files / tree_sitter_hygen_template-0.5.0.tar.gz

Download URL tree_sitter_hygen_template-0.5.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ea899949d2ae36aabe948f20fb4a20c0f2a7c5bb195e2c68c0c5cd1295bce04f
BLAKE2b-256 checksum
How to use checksums
5fe8f6806742052afc6171e83fa659e0756db49f39f6e98903860030b901f934
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tree_sitter_hygen_template-0.5.0-cp39-abi3-win_arm64.whl

Download URL tree_sitter_hygen_template-0.5.0-cp39-abi3-win_arm64.whl
Size 13.9 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
ab649ed3d005bdf362ec65c0a546c2520e507fca630a505d023f977631830e47
BLAKE2b-256 checksum
How to use checksums
219f8dc5b7af22c158dba4d0f1c1ac980f48ceb5b9f63a8a738d6d55944c43ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tree_sitter_hygen_template-0.5.0-cp39-abi3-win_amd64.whl

Download URL tree_sitter_hygen_template-0.5.0-cp39-abi3-win_amd64.whl
Size 14.9 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c5631d370418d782720a914253e404acd93496f8bdb4f86addc989789305afaa
BLAKE2b-256 checksum
How to use checksums
e35a5644217890454528b101f3d46d0a7e52601e72b804c17ee1b5ddf755aa0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tree_sitter_hygen_template-0.5.0-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL tree_sitter_hygen_template-0.5.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 21.0 kB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
04cbd818bd66e305b3ff13f283ec98e480b066ff563ccd715511d8ceb6026249
BLAKE2b-256 checksum
How to use checksums
4684e9ad34f404672e018727e9f6d8c39060fb10667018f2d05140299f787902
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tree_sitter_hygen_template-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL tree_sitter_hygen_template-0.5.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 22.2 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
58d0300bc008e22fdbf34ff944bfade24aa9855fec37848d5b25e464c78724a9
BLAKE2b-256 checksum
How to use checksums
55b912c3430f3eb7505edfe2f2292a92c1ee7db81f7142798280d980670d4c22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tree_sitter_hygen_template-0.5.0-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tree_sitter_hygen_template-0.5.0-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 22.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64 abi3
SHA-256 checksum
How to use checksums
2fe9574957252ca85bf6d08e30734e4411c9f1099544396f7426d1e8749b6c26
BLAKE2b-256 checksum
How to use checksums
88e70479e45f1425eb9516bedcbcdc73d9e617990d125c29dfffa127c3eb7af7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tree_sitter_hygen_template-0.5.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL tree_sitter_hygen_template-0.5.0-cp39-abi3-macosx_11_0_arm64.whl
Size 12.6 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
4ceb34fd1e080f8ca062e769b5b04dab3c6cfbdd83872c36efcb0e455b32c643
BLAKE2b-256 checksum
How to use checksums
8e91fa1494fb7df6c11113d4f1d0a088fed44d4f74b40345401c8b1cb17df935
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / tree_sitter_hygen_template-0.5.0-cp39-abi3-macosx_10_9_x86_64.whl

Download URL tree_sitter_hygen_template-0.5.0-cp39-abi3-macosx_10_9_x86_64.whl
Size 12.1 kB
Tags CPython 3.9 abi3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
9dae82fe843f7b007d448c6355d207409b377dfde46377c6f15ec0384c822621
BLAKE2b-256 checksum
How to use checksums
a9ff658057b5f999d0ee76c48ebb3df6181c977ad426f8c911c682387f6a6af5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release history Release notifications | RSS feed

This release

0.5.0 This release

8 release files

0.4.2

8 release files

0.4.1

8 release files

0.4.0

8 release files

0.3.4

8 release files

0.3.2

8 release files

0.3.1

8 release files

0.3.0

8 release files

0.2.3

9 release files

0.2.2

9 release files

0.2.1

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page