|
| 1 | +; Elixir Code Comments |
1 | 2 | ((comment) @injection.content
|
2 | 3 | (#set! injection.language "comment"))
|
3 | 4 |
|
| 5 | +; Elixir Regular Expressions |
4 | 6 | ((sigil
|
5 | 7 | (sigil_name) @_sigil_name
|
6 | 8 | (quoted_content) @injection.content)
|
7 |
| - (#match? @_sigil_name "^(r|R)$") |
| 9 | + (#match? @_sigil_name "^(R|r)$") |
8 | 10 | (#set! injection.language "regex")
|
9 | 11 | (#set! injection.combined))
|
10 | 12 |
|
11 |
| -((sigil |
12 |
| - (sigil_name) @_sigil_name |
13 |
| - (quoted_content) @injection.content) |
14 |
| - (#eq? @_sigil_name "H") |
15 |
| - (#set! injection.language "heex") |
16 |
| - (#set! injection.combined)) |
17 |
| - |
| 13 | +; Elixir Markdown Documentation |
18 | 14 | (unary_operator
|
19 | 15 | operator: "@"
|
20 | 16 | operand: (call
|
|
23 | 19 | (string (quoted_content) @injection.content)
|
24 | 20 | (sigil (quoted_content) @injection.content)
|
25 | 21 | ])) (#set! injection.language "markdown"))
|
| 22 | + |
| 23 | +; Zigler Sigils |
| 24 | +((sigil |
| 25 | + (sigil_name) @_sigil_name |
| 26 | + (quoted_content) @injection.content) |
| 27 | + (#match? @_sigil_name "^(Z|z)$") |
| 28 | + (#set! injection.language "zig") |
| 29 | + (#set! injection.combined)) |
| 30 | + |
| 31 | +; Jason Sigils |
| 32 | +((sigil |
| 33 | + (sigil_name) @_sigil_name |
| 34 | + (quoted_content) @injection.content) |
| 35 | + (#match? @_sigil_name "^(J|j)$") |
| 36 | + (#set! injection.language "json") |
| 37 | + (#set! injection.combined)) |
| 38 | + |
| 39 | +; Phoenix Live View HEEx Sigils |
| 40 | +((sigil |
| 41 | + (sigil_name) @_sigil_name |
| 42 | + (quoted_content) @injection.content) |
| 43 | + (#eq? @_sigil_name "H") |
| 44 | + (#set! injection.language "heex") |
| 45 | + (#set! injection.combined)) |
| 46 | + |
| 47 | +; Phoenix Live View Component Macros |
| 48 | +(call |
| 49 | + (identifier) @_identifier |
| 50 | + (arguments |
| 51 | + (atom)+ |
| 52 | + (keywords (pair |
| 53 | + ((keyword) @_keyword (#eq? @_keyword "doc: ")) |
| 54 | + [ |
| 55 | + (string (quoted_content) @injection.content) |
| 56 | + (sigil (quoted_content) @injection.content) |
| 57 | + ])) |
| 58 | + (#match? @_identifier "^(attr|slot)$") |
| 59 | + (#set! injection.language "markdown"))) |
0 commit comments