textobjects.scm

 1(call
 2  target: ((identifier) @_identifier
 3    (#any-of? @_identifier "defmodule" "defprotocol" "defimpl"))
 4  (do_block
 5    "do"
 6    (_)* @class.inside
 7    "end")) @class.around
 8
 9(anonymous_function
10  (stab_clause
11    right: (body) @function.inside)) @function.around
12
13(call
14  target: ((identifier) @_identifier
15    (#any-of? @_identifier "def" "defmacro" "defmacrop" "defn" "defnp" "defp"))
16  (do_block
17    "do"
18    (_)* @function.inside
19    "end")) @function.around
20
21(call
22  target: ((identifier) @_identifier
23    (#any-of? @_identifier "def" "defmacro" "defmacrop" "defn" "defnp" "defp"))
24  (arguments
25    (_)
26    (keywords
27      (pair
28        value: (_) @function.inside)))) @function.around
29
30(call
31  target: ((identifier) @_identifier
32    (#any-of? @_identifier "defdelegate" "defguard" "defguardp"))) @function.around
33
34(comment) @comment.around
35
36(unary_operator
37  operator: "@"
38  operand: (call
39    target: ((identifier) @_identifier
40      (#any-of? @_identifier "moduledoc" "typedoc" "shortdoc" "doc"))
41    (arguments
42      [
43        (keywords) @comment.inside
44        (string
45          (quoted_content) @comment.inside)
46      ]))) @comment.around