Commit 0d06487
authored
Expose
Exposing `runnables` captures makes them
available as Zed template variables. Each capture
is mapped to a Zed variable in the format:
```
ZED_CUSTOM_$(capture_name)
```
For example, consider this query:
```
(
(call method: (identifier) @name)
)
```
This exposes the `@name` capture,
which can then be referenced in Zed templates as:
```
$ZED_CUSTOM_name
```
Key notes:
- Case Sensitivity: The syntax is case-sensitive. Ensure matches between
capture names (e.g., `@name`) and variable references (e.g.,
`$ZED_CUSTOM_name`).
- Underscores: Captures prefixed with underscores (e.g., `@_ruby-test`)
are not mapped to Zed variables.runnables captures (#94)1 parent 6bbadba commit 0d06487
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments