Skip to content

Commit dc6794a

Browse files
committed
feat: inject sigils
Based on #75 and #84 I'm assuming it's fine to inject more sigils. I've included ones from https://elixir-lang.org/blog/2025/08/18/interop-and-portability and a couple others that seems popular.
1 parent b848e63 commit dc6794a

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

queries/injections.scm

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
((sigil
33
(sigil_name) @_sigil_name
44
(quoted_content) @injection.content)
5-
(#any-of? @_sigil_name "H" "LVN")
5+
(#any-of? @_sigil_name "H" "LVN" "HOLO")
66
(#set! injection.language "heex")
77
(#set! injection.combined))
88

@@ -13,3 +13,51 @@
1313
(#eq? @_sigil_name "SQL")
1414
(#set! injection.language "sql")
1515
(#set! injection.combined))
16+
17+
; Markdown
18+
(sigil
19+
(sigil_name) @_sigil_name
20+
(quoted_content) @injection.content
21+
(#eq? @_sigil_name "MD")
22+
(#set! injection.language "markdown")
23+
(#set! injection.combined))
24+
25+
; Zig
26+
(sigil
27+
(sigil_name) @_sigil_name
28+
(quoted_content) @injection.content
29+
(#any-of? @_sigil_name "z" "Z")
30+
(#set! injection.language "zig")
31+
(#set! injection.combined))
32+
33+
; Python
34+
((sigil
35+
(sigil_name) @_sigil_name
36+
(quoted_content) @injection.content)
37+
(#eq? @_sigil_name "PY")
38+
(#set! injection.language "python")
39+
(#set! injection.combined))
40+
41+
; JavaScript
42+
((sigil
43+
(sigil_name) @_sigil_name
44+
(quoted_content) @injection.content)
45+
(#eq? @_sigil_name "JS")
46+
(#set! injection.language "javascript")
47+
(#set! injection.combined))
48+
49+
; Svelte
50+
(sigil
51+
(sigil_name) @_sigil_name
52+
(quoted_content) @injection.content
53+
(#eq? @_sigil_name "V")
54+
(#set! injection.language "svelte")
55+
(#set! injection.combined))
56+
57+
; Vue
58+
(sigil
59+
(sigil_name) @_sigil_name
60+
(quoted_content) @injection.content
61+
(#eq? @_sigil_name "VUE")
62+
(#set! injection.language "vue")
63+
(#set! injection.combined))

0 commit comments

Comments
 (0)