File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,16 @@ Writing language injection queries allows one to highlight a specific node as a
4
4
In addition to the [ standard] [ upstream-docs ] language injection options used by tree-sitter, there
5
5
are a few Helix specific extensions that allow for more control.
6
6
7
- And example of a simple query that would highlight all strings as bash in Nix:
7
+ An example of a simple query that would highlight all strings as bash in Nix:
8
8
``` scm
9
9
((string_expression (string_fragment) @injection.content)
10
10
(#set! injection.language "bash"))
11
11
```
12
+ Another example is this query, which highlights links in comments and keywords like "TODO", by reusing the dedicated "comment" language:
13
+ ```
14
+ ((comment) @injection.content
15
+ (#set! injection.language "comment"))
16
+ ```
12
17
13
18
## Capture Types
14
19
You can’t perform that action at this time.
0 commit comments