1 unstable release
new 0.1.0 | Feb 5, 2025 |
---|
#99 in Parser tooling
120 downloads per month
260KB
8K
SLoC
Contains (Mach-o exe, 42KB) src/parser.o
tree-sitter-ink
tree-sitter grammar for ink by inkle with full unicode support.
![Ink Demo](https://img.gs/czjpqfbdkz/263/https://raw.githubusercontent.com/rhizoome/tree-sitter-ink/3bafa20b888b97a505164fa9ee3812c331b2b809/assets/demo.png)
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