This is an unofficial tree-sitter grammar for Cooklang.
tree-sitter generateto compile the grammar and generate the different bindings.tree-sitter testto run the tests (incorpusfolder)make cleanto remove all generated files
To use the syntax highlight with tree-sitter, follow the indication in the doc. Then you can run tree-sitter highlight {your_file}.cook. You should see something like
Follow the indication in the adding languages page, or:
-
Edit your
language.tomlfile to add[[language]] name = "cooklang" scope = "source.cook" file-types = ["cook"] roots = [] [[grammar]] name = "cooklang" source = { path = "/local/path/to/tree-sitter-cooklang"}
-
In your helix configuration folder, be sure that the folders
runtime/grammarsandruntime/queries/cooklangexists. -
Copy the content of the
queriesfolder to your personalruntime/queries/cooklang -
build the grammar by doing
hx --grammar build cooklang

