embedding.scm

 1(
 2    (unary_operator
 3        operator: "@"
 4        operand: (call
 5            target: (identifier) @unary
 6            (#match? @unary "^(doc)$"))
 7        ) @context
 8    .
 9    (call
10        target: (identifier) @name
11        (arguments
12            [
13            (identifier) @name
14            (call
15                target: (identifier) @name)
16                (binary_operator
17                    left: (call
18                    target: (identifier) @name)
19                    operator: "when")
20            ])
21        (#match? @name "^(def|defp|defdelegate|defguard|defguardp|defmacro|defmacrop|defn|defnp)$")) @item
22        )
23
24    (call
25        target: (identifier) @name
26        (arguments (alias) @name)
27        (#match? @name "^(defmodule|defprotocol)$")) @item