Skip to content

Commit ca34b3e

Browse files
authored
feat(treesitter): injections (#75)
- highlight the template argument of `EEx.function_from_string` as `eex` - highlight the argument of `execute` as `sql` (Ecto migrations). Closes #9
1 parent 4601e36 commit ca34b3e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

queries/elixir/injections.scm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; extends
2+
3+
(call
4+
target: ((identifier) @_identifier (#eq? @_identifier "execute"))
5+
(arguments
6+
(string
7+
(quoted_content) @sql)))
8+
9+
((call
10+
target: (dot
11+
left: (alias) @_mod (#eq? @_mod "EEx")
12+
right: (identifier) @_func (#eq? @_func "function_from_string"))
13+
(arguments
14+
(string
15+
(quoted_content) @eex))))

0 commit comments

Comments
 (0)