From c5d96bec3d5279904525292ef933a985a974b017 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 17:13:46 -0300 Subject: Zig has textobjects: helix's query, ported to the zig grammar pardes builds pardes builds maxxnino/tree-sitter-zig, whose node names are not those of the grammar helix's query targets, so the query is ported by hand (vendor/queries/zig, its MPL header saying it is modified and how): a function is a Decl holding an FnProto and a Block with pub beside it, struct/enum/union one ContainerDecl, parameters and arguments ParamDeclList and FnCallArguments, and comments come in three kinds. That grammar's comments take their line's newline, and a node ending in a newline is now taken without it, as helix's grammars have it. The replay test gains fifteen Zig cases from the installed hx; none walks call arguments, which the reference helix counts as parameters and 25.07.1's query does not. Co-Authored-By: Claude Opus 5.5 --- vendor/queries/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'vendor/queries/README.md') diff --git a/vendor/queries/README.md b/vendor/queries/README.md index abd37d00..082f4e6b 100644 --- a/vendor/queries/README.md +++ b/vendor/queries/README.md @@ -8,8 +8,11 @@ is `helix.LICENSE` here. They give `]f`, `[f`, `mif` and the other tree-sitter textobject keys what a function, class, argument, comment, test, entry or element is. +`zig/textobjects.scm` is helix's query MODIFIED by hand for the zig grammar +pardes builds, which names its nodes differently; its header says how. + Not vendored: fortran, markdown and powershell (helix has no query for -them), and erlang and zig, whose helix queries do not compile against the -grammar versions pardes builds (a node name either side has renamed). Those +them), and erlang, whose helix query does not compile against the grammar +version pardes builds. Those grammars have no textobjects, and the keys do nothing there, as in helix without a query. -- cgit v1.3