aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/elixir/injections.scm
blob: 5c58a8630d77779a25642b4becd7570e2cab0cca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
((comment) @injection.content
 (#set! injection.language "comment"))

((sigil
  (sigil_name) @_sigil_name
  (quoted_content) @injection.content)
 (#match? @_sigil_name "^(r|R)$")
 (#set! injection.language "regex")
 (#set! injection.combined))

((sigil
  (sigil_name) @_sigil_name
  (quoted_content) @injection.content)
 (#eq? @_sigil_name "H")
 (#set! injection.language "heex")
 (#set! injection.combined))

(unary_operator
  operator: "@"
  operand: (call
  target: ((identifier) @_identifier (#match? @_identifier "^(module|type|short)?doc$"))
    (arguments [
      (string (quoted_content) @injection.content)
      (sigil (quoted_content) @injection.content)
  ])) (#set! injection.language "markdown"))