tree-sitter-ink

Crates.iotree-sitter-ink
lib.rstree-sitter-ink
version0.1.0
created_at2025-02-05 10:15:21.170523+00
updated_at2025-02-05 10:15:21.170523+00
descriptionInk by Inkle
homepage
repositoryhttps://github.com/rhizoome/tree-sitter-ink
max_upload_size
id1543803
size366,692
Jean-Louis Fuchs (rhizoome)

documentation

README

tree-sitter-ink

tree-sitter grammar for ink by inkle with full unicode support.

Ink Demo

State

It currently does not parse code and conditions further, but I plan to implement this. First I am working on a language-server based on tree-sitter-ink with the goal of having an IDE with full unicode support.

Install for helix

Edit hx ~/.config/helix/languages.toml and replace $long_revision.

[[language]]
name = "ink"
scope = "source.ink"
injection-regex = "ink"
file-types = ["ink"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/"}
indent = { tab-width = 4, unit = "\t" }
soft-wrap = { enable = true }
grammar = "ink"

[[grammar]]
name = "ink"
source = { git = "https://github.com/rhizoome/tree-sitter-ink", rev = "$long_revision" }

Copy the highlights.scm from this repo and install latest grammars.

mkdir -p ~/.config/helix/runtime/queries/ink
cp queries/highlights.scm ~/.config/helix/runtime/queries/ink/
hx --grammar fetch && hx --grammar build
hx assets/demo.ink

License

I use standard rust style APACHE/MIT dual licensing.

Commit count: 85

cargo fmt