Hygen Template grammar for tree-sitter
Project description
tree-sitter-hygen-template
Tree-sitter grammar for Hygen templates.
Usage in Editors
Neovim
Required parsers
embedded-template
: highlight ofejs
tags
Optional parsers
bash
: highlight ofmetadata.value
whenmetadata.key
issh
javascript
: highlight ofcode
nodes
Installation
-
Add the following to your
init.lua
or respective config file:local parser_config = require("nvim-treesitter.parsers").get_parser_configs() -- NOTE: add the parser to `parser_config` before calling `setup()` parser_config.hygen_template = { install_info = { url = "https://github.com/Hdoc1509/tree-sitter-hygen-template", files = { "src/parser.c" }, generate_requires_npm = true, revision = 'release', }, filetype = "hygen", } require('nvim-treesitter.configs').setup({ ensure_installed = { --- other parsers 'hygen_template', }, -- other options })
-
Copy the queries from
queries
directory toqueries/hygen_template
directory in yourneovim
configuration directory:With Path Unix ~/.config/nvim
Windows ~/AppData/Local/nvim
XDG_CONFIG_HOME
set$XDG_CONFIG_HOME/nvim
-
Copy the
filetype.vim
file to yourneovim
configuration directoryftdetect
subdirectory ashygen.vim
.[!NOTE]
hygen
filetype will match all files withname.ext.hygen
pattern, whereext
will be used to extract the parser to be injected. -
Copy the
directive.lua
file to yourneovim
configuration directory and add the following to yourinit.lua
or respective config file:local hygen_directive = require('path-to.hygen-directive') local directives = { hygen_directive } for _, directive in ipairs(directives) do vim.treesitter.query.add_directive( directive.name, directive.callback, directive.options ) end
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for tree_sitter_hygen_template-0.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | decbbd6eb04496744c735a8f1777bae4c24873e6c9174182c55bffeab7ab43eb |
|
MD5 | 27ae820b43d8a844993c56f7b33e80f4 |
|
BLAKE2b-256 | 0bac33a9c4f9efd3d0d59f358910fe6468e3e538eec367cd8375e0b508ae5f2c |
Close
Hashes for tree_sitter_hygen_template-0.2.2-cp39-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 589858ddd44faca66c72c531d5001abfedfbf849aceb96fd37d25b6a54cae742 |
|
MD5 | f4c6c2cc973161b800780e1db82d9b17 |
|
BLAKE2b-256 | 8e187510100755708b4690e5a4b4ae3ca5292d28101b5f9ede2dcba26d501848 |
Close
Hashes for tree_sitter_hygen_template-0.2.2-cp39-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7981b66b925377ce58701060613a1e5099f4d7462108f46bb0e1bbba91276ec8 |
|
MD5 | 86fca61dbad1ab998395c99983a5d73a |
|
BLAKE2b-256 | 28043b00ab70ceba2f130a84e423409e222e369cb433f1b642142ce0161729c8 |
Close
Hashes for tree_sitter_hygen_template-0.2.2-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f77cd97ef93cdea77073398840b44f0520a405b10c1b691ac6195366327432b |
|
MD5 | 5e8b9d4f21260a16dfdf6f7b677629fa |
|
BLAKE2b-256 | 620b6eec0da21cd0add591ddf321cd1b847bffc3c549b66608d0a169cb74dbdb |
Close
Hashes for tree_sitter_hygen_template-0.2.2-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93b2c96d1d8a6b5d411a1188b438eca6651ff3d629f556ea8dfecf284eb27155 |
|
MD5 | 36da554a1cbfd25659d77c736a37e967 |
|
BLAKE2b-256 | a2c2ee72755efb59fadf58db3677c7b3402b7f32436ab3d54c5c573e58eb0473 |
Close
Hashes for tree_sitter_hygen_template-0.2.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92dc6c874dd47570a9bccddb30efffb4afe3f8099eefa4c60ae1725fdbf41847 |
|
MD5 | 1b653d85c9b20ca1a520cf2f40ab3133 |
|
BLAKE2b-256 | c7fadc8ab3674fb2abeef4f4fb85ed27f316eb0ebcff91f6a41d7c38f5e267df |
Close
Hashes for tree_sitter_hygen_template-0.2.2-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38b60f4d0ce8aea973c52a8455d5c237b8f8f008258af5defd3be358a7a6c495 |
|
MD5 | 5229adfdbb6b3906624340d813282d8f |
|
BLAKE2b-256 | 50148d520f7f285f5ad33c2671653ad277ef3d72f12e1cb0c684760c06eba532 |
Close
Hashes for tree_sitter_hygen_template-0.2.2-cp39-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a16adf311728b69f7feebccbd197aa7f772f1bd9be4bed636621b53de1208d97 |
|
MD5 | 4001b1f39bb3434d86c57f42bb7af913 |
|
BLAKE2b-256 | 70134f721a74c3341ffd50da948000d40eb487f2569189c7f2baedf9a3f108fa |
Close
Hashes for tree_sitter_hygen_template-0.2.2-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f11f5994cdbe9feffdfa7fe2e2c145fbd8c9ccc8a2cde6c472d67b34458cde17 |
|
MD5 | 503eca2d25f558f0eaf90ea4e74feab9 |
|
BLAKE2b-256 | 7010d7f72b531572a4ce144a7fd89ef9ae0c3e7644779c086611b29ec2be7507 |