Skip to content

Commit 9be382a

Browse files
committed
feat: inject sigils
Based on elixir-lang#75 and elixir-lang#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 9be382a

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

queries/injections.scm

Lines changed: 45 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,47 @@
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+
24+
; Zig
25+
(sigil
26+
(sigil_name) @_sigil_name
27+
(quoted_content) @injection.content
28+
(#any-of? @_sigil_name "z" "Z")
29+
(#set! injection.language "markdown"))
30+
31+
; Python
32+
((sigil
33+
(sigil_name) @_sigil_name
34+
(quoted_content) @injection.content)
35+
(#eq? @_sigil_name "PY")
36+
(#set! injection.language "python")
37+
(#set! injection.combined))
38+
39+
; JavaScript
40+
((sigil
41+
(sigil_name) @_sigil_name
42+
(quoted_content) @injection.content)
43+
(#eq? @_sigil_name "JS")
44+
(#set! injection.language "javascript")
45+
(#set! injection.combined))
46+
47+
; Svelte
48+
(sigil
49+
(sigil_name) @_sigil_name
50+
(quoted_content) @injection.content
51+
(#eq? @_sigil_name "V")
52+
(#set! injection.language "svelte"))
53+
54+
; Vue
55+
(sigil
56+
(sigil_name) @_sigil_name
57+
(quoted_content) @injection.content
58+
(#eq? @_sigil_name "VUE")
59+
(#set! injection.language "vue"))

0 commit comments

Comments
 (0)