Shared tree-sitter helpers for Helix Steel plugins. Generic: no language assumptions.
ts.scm— tree/rope glue. Document and tree access, byte↔char conversion, node geometry (as char offsets), node lookup by char offset, and re-exports of thetsnode-*builtins.nav.scm— structural navigation. Sibling lookup (named-siblings,next-named-sibling,prev-named-sibling) and the parent-climbing variants (next-named-sibling/climb,prev-named-sibling/climb) that match Helix's built-in sibling motions.
Depend on it from a plugin's cog.scm:
(define dependencies
'((#:name "ts-utils.hx"
#:git-url "https://github.com/waddie/ts-utils.hx")))Then require the modules by package path:
(require "ts-utils.hx/ts.scm")
(require "ts-utils.hx/nav.scm")