Skip to content

Lysander6/tree-sitter-jqtpl

Repository files navigation

tree-sitter-jqtpl

jqtpl grammar for tree-sitter

Prerequisites

Either use asdf (v0.11.0-6a4f51a) or check .tool-versions and install them manually.

Setup

asdf install
npm install
npx tree-sitter init-config

Open ~/.config/tree-sitter/config.json and extend "parser-directories" array with the absolute path to parent directory of this repository. For example, if your pwd is /home/lysander/projects/tree-sitter-jqtpl then add /home/lysander/projects.

Development

# regenerate implementation files after changes to `grammar.js`
npx tree-sitter generate

# test parser
npx tree-sitter test

# highlight a file
npx tree-sitter highlight ../some/file.jqtpl