aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries/elm/textobjects.scm
blob: d212e9c3b3cbebd422a265acf8bb3672c7201806 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
(line_comment) @comment.inside
(line_comment)+ @comment.around
(block_comment) @comment.inside
(block_comment)+ @comment.around

((type_annotation)?
  (value_declaration
    (function_declaration_left (lower_case_identifier))
    (eq)
    (_) @function.inside
  )
) @function.around

(parenthesized_expr
  (anonymous_function_expr
    (
      (arrow)
      (_) @function.inside
    )
  )
) @function.around

(value_declaration
  (function_declaration_left
    (lower_pattern
      (lower_case_identifier) @parameter.inside @parameter.around
    )
  )
)

(value_declaration
  (function_declaration_left
    (pattern) @parameter.inside @parameter.around
  )
)

(value_declaration
  (function_declaration_left
    (tuple_pattern
      (pattern) @parameter.inside
    ) @parameter.around
  )
)

(value_declaration
  (function_declaration_left
    (record_pattern
      (lower_pattern
        (lower_case_identifier) @parameter.inside
      )
    ) @parameter.around
  )
)

(parenthesized_expr
  (anonymous_function_expr
    (
      (backslash)
      (pattern) @parameter.inside
      (arrow)
    )
  )
)