Languages / Nix · Edit queries/tags.scm
Tier 2 · Declarative tags.scmNix
Declarative tree-sitter query plugin powered by QueryLanguagePlugin (rgctl-lang-runtime) and crates/rgctl-lang-nix/queries/tags.scm. Compiles once at startup, validates captures against the Tier-2 vocabulary gate, and extracts symbols, container hierarchy (Container::member), imports, and call edges.
- Grammar Crate
- tree-sitter-nix
- Plugin
- QueryLanguagePlugin (rgctl-lang-nix)
- Extensions
- .nix
- Discover
- rgctl discover . -l nix
- Function Kinds
- function_expression
- Class / Container Kinds
- —
Capture summary
| Capture | Patterns | Graph mapping |
|---|---|---|
| @definition.function | 1 | Emits SymbolType::Function (acts as caller scope & container). |
| @name | 2 | Symbol identifier or target callee/type name. |
| @reference.call | 1 | Emits RelationType::Calls from innermost enclosing function to @name. |
Query source (crates/rgctl-lang-nix/queries/tags.scm)
; Tier-2 Nix tags for rgctl (`handler = "queries"`).
(binding
attrpath: (attrpath attr: (identifier) @name)
expression: (function_expression)) @definition.function
(apply_expression
function: (variable_expression name: (identifier) @name)) @reference.call
Related: Tier 2 language support · Tier 1 language support · Discovering and indexing