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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 774c3a5992563c31b62bec1c999a62225f23f48bea7038e96155bb0728e0718b |
|
MD5 | c52352af36876de84d39edb1395a46f7 |
|
BLAKE2b-256 | 834761f41cab27ab7b15b4fcde7d0923616a558ed932044134b2e0f6afebe0a7 |
Close
Hashes for tree_sitter_hygen_template-0.2.1-cp39-abi3-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a3ca6f8271b2970cce853c4f6605a59868087d8483bb97408be43bfe325c3df |
|
MD5 | 40f76e766aa302bffd6903709f32aabd |
|
BLAKE2b-256 | 5651cd0d7fca1d4a9357b71574ebcddead8904fbde40d5b3375d91f95a186aad |
Close
Hashes for tree_sitter_hygen_template-0.2.1-cp39-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 570a5f18b6b5c9ad98b36d518c120bb1966b836d64bf54d01299307b25595c49 |
|
MD5 | 3b57bcf7cdc27d113e9667c5e900703c |
|
BLAKE2b-256 | 67d343c923d539ba0aa6b3ef815a797fddd5741df3007ed94fc406bf7eab681b |
Close
Hashes for tree_sitter_hygen_template-0.2.1-cp39-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17fda6268f01fa17e339e24a2dc8df26e855f10c8a2a6f450e12daf64c5d5bed |
|
MD5 | ee04bb9e1a38c6e257c14fd705a0df1c |
|
BLAKE2b-256 | 635704ffb7b06b71c681c4c4915e78127e441ee7b2fbaaee24b74efb772f3983 |
Close
Hashes for tree_sitter_hygen_template-0.2.1-cp39-abi3-musllinux_1_2_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de828c0e910bc696fac6d04cf5a34aec4681291c839536b13df3b30d90544b0e |
|
MD5 | aec560c7465f859bb1ce0ccbd493212f |
|
BLAKE2b-256 | 5d1b260e3b4d8b140fb4a9d444a5dcf89a07713d8170341a08ca963c6e936bd1 |
Close
Hashes for tree_sitter_hygen_template-0.2.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9e5cf5b65c699e3f6a2943bee2aa09069a18ff383f1edc891b2728926a69277 |
|
MD5 | 16f5e9829b3e2c30dca72c32b55d6afa |
|
BLAKE2b-256 | 84c60b4e2006d1e7d942d74db65889bca87e7a47fb450988ee66a00ebd1eac5c |
Close
Hashes for tree_sitter_hygen_template-0.2.1-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9c3a09cc2f0f269d01e8d98bcf1c10ec6c838084951ec44da67fec1c36df6f1 |
|
MD5 | 3e3b4eaa8c2b590297ab12bb2399fe2a |
|
BLAKE2b-256 | e46eeb70dc74d6309c628f2750818d07358fc6a97efc5ef4467c3c92672a0d24 |
Close
Hashes for tree_sitter_hygen_template-0.2.1-cp39-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 908551b5c3b8379edfc8ee6511b18f6d1b7c5e038a964ea8e7c0f39a309a5c9e |
|
MD5 | 566459f21ee3f6e13d82646aef93d83c |
|
BLAKE2b-256 | 0c5ea94c204a37ea9845bd85eb5964b019dee8102b9ff58c5a00999afd406f2d |
Close
Hashes for tree_sitter_hygen_template-0.2.1-cp39-abi3-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49b75d59d9ec5a18796d2360525e0b13c5c12f2a2f41225a193d4bf261ef4f1b |
|
MD5 | e4557781841b6f54a2f8282ed209fd90 |
|
BLAKE2b-256 | d68b888c708d4e5ec9ed18b5df5b90dba43559adb615a7d54f20910901b58eaa |