summaryrefslogtreecommitdiff
path: root/vendor/queries/ocaml/textobjects.scm
blob: 9e6bb2cdebb2fa75e31ee837172db8b94837da62 (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
; Vendored from helix (https://github.com/helix-editor/helix) at 278b24389:
; runtime/queries/ocaml/textobjects.scm.
; Licensed under the Mozilla Public License 2.0 (vendor/queries/helix.LICENSE,
; https://mozilla.org/MPL/2.0/).

; Value/function definitions
(value_definition) @function.around
(value_definition
  (let_binding
    body: (_) @function.inside))

(fun_expression
  body: (_) @function.inside) @function.around

(function_expression) @function.around

(method_definition
  body: (_) @function.inside) @function.around

; Types and modules
(type_definition) @class.around
(type_definition
  (type_binding
    body: (_) @class.inside))

(module_definition) @class.around
(module_definition
  (module_binding
    body: (_) @class.inside))

; Parameters
(parameter) @parameter.around
(parameter
  pattern: (_) @parameter.inside)

(comment) @comment.inside
(comment)+ @comment.around