Conversation
Keep an initialized global Grit directory alive for CLI tests so they do not depend on user state. Isolate the remote-pattern module cache and update the Valibot fixture to its maintained repository.
Use the Tree-sitter 0.21 WASM command, honor grammar copy exclusions, and surface generation failures across platforms.
Register Nix for native, CLI, LSP, documentation, and WASM use. Generate a metavariable-aware parser from nix-community/tree-sitter-nix and cover structural matching, diagnostics, rewrites, and filename detection. Base the GritQL grammar update on canonical Biome main and include the prerequisite snippet-tokenization fix.
Expose attrset and let binding sets as fields so nested bindings participate in structural matching. Accept metavariables in Nix function parameters and cover indented strings, malformed files, and nested constructs.
Point the GritQL grammar submodule at the fork containing the combined prerequisite branches so draft parent CI can initialize before the grammar changes merge. Drop this commit after updating to canonical upstream.
kubijo
marked this pull request as draft
September 11, 2026 10:27
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add first-class Nix support using
nix-community/tree-sitter-nixat7799b6c, with parser artifacts generated using Tree-sitter CLI v0.21.0.This adds:
.nixfilename detection andlanguage nixRelated grammar PRs:
While those are under review, this draft temporarily points
vendor/tree-sitter-gritqltokubijo/tree-sitter-gritql@55043f2, which combines both grammar changes. That review-only commit will be removed and replaced with the canonical merged SHA before this PR is marked ready.The stack also includes narrow fixes that make CLI test setup and grammar-generation failures reliable for contributors.
Test Plan
cargo +1.82.0 fmt -- --checkcargo +1.82.0 clippy ... -D warningsconfirm_telemetry_flushtest skippedwasm-pack build --target webwasm-tools validate crates/wasm-bindings/wasm_parsers/tree-sitter-nix.wasmDocs
Updated the target-language reference and documentation language mappings to include Nix.
AI assistance: OpenAI Codex assisted with repository investigation, implementation, parser regeneration, test development, and validation. I reviewed the resulting changes and test output.