1 unstable release

new 0.1.0 Feb 5, 2025

#99 in Parser tooling

Download history 120/week @ 2025-02-02

120 downloads per month

MIT/Apache

260KB
8K SLoC

C 7.5K SLoC // 0.0% comments JavaScript 313 SLoC // 0.1% comments Scheme 32 SLoC // 0.3% comments Rust 27 SLoC // 0.3% comments

Contains (Mach-o exe, 42KB) src/parser.o

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.

Dependencies

~4–310KB