edge/helix: tree-sitter-grammars package out of sync.
The grammars provided by the package tree-sitter-grammars
have an incompatible API with the currently packaged version of the package helix
. The upstream solution to this is either to bundle the grammar files or for the user to compile them with the assistance of helix (hx -g fetch && hx -g build
). The former seems to be intentionally disabled as per the APKBUILD. The latter attempts to fetch into a root owned directory (/usr/lib/tree-sitter
) which conflicts with the tree-sitter-*
family of packages.
I don't personally have the bandwidth to spin up a build environment for Alpine, but I would like to propose a few options:
- Update helix and going forward expect testing against each other is done when merging changes to
tree-sitter-*
orhelix
packages. - Bundle enable bundling the grammars in helix's APKBUILD and permit them to drift from the
tree-sitter-*
packages. - Move the symlink in helix's APKBUILD to point to
/usr/local/share/helix-grammars
thus permitting the use ofhx -g fetch && hx -g build
without conflicting with thetree-sitter-*
packages
Expected
Helix would load without error the grammars shipped as part of the package tree-sitter-grammar
.
Actual
$ hx foo.bash
thread 'main' panicked at 'Could not parse queries for language "bash". Are your grammars out of sync? Try running 'hx --grammar fetch' and 'hx --grammar build'. This query could not be parsed: QueryError { row: 48, column: 3, offset: 520, message: "expansion_flags", kind: NodeType }', helix-core/src/syntax.rs:384:43
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted