Skip to content

Tree-sitter grammar for ink by inkle

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rhizoome/tree-sitter-ink

Repository files navigation

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.

About

Tree-sitter grammar for ink by inkle

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published