Skip to content

Commit 19757cd

Browse files
committed
Add queries
1 parent 4218a1d commit 19757cd

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

queries/erlang/injections.scm

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
(call
2+
expr: (remote
3+
module: (remote_module
4+
module: (atom) @module (#eq? @module "arizona_render"))
5+
fun: (atom) @fun (#match? @fun "^view_template|component_template$"))
6+
args: (expr_args
7+
args: (var)
8+
args: (var)
9+
args: (string) @injection.content
10+
(#gsub! @injection.content "\"+(.*)[^\"]" "%1")
11+
(#set! injection.language "herl")))
12+
13+
(call
14+
expr: (remote
15+
module: (remote_module
16+
module: (atom) @module (#eq? @module "arizona_render"))
17+
fun: (atom) @fun (#eq? @fun "template"))
18+
args: (expr_args
19+
args: (string) @injection.content
20+
(#gsub! @injection.content "\"+(.*)[^\"]" "%1")
21+
(#set! injection.language "herl")))

queries/herl/highlights.scm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
(text) @html
2+
(expression) @erlang
3+
4+
[
5+
"{"
6+
"}"
7+
] @punctuation.bracket

queries/herl/injections.scm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
((tokens
2+
(text) @injection.content)
3+
(#set! injection.language "html")
4+
(#set! injection.combined))
5+
6+
((tokens
7+
(expression) @injection.content)
8+
(#set! injection.language "erlang"))

0 commit comments

Comments
 (0)