summaryrefslogtreecommitdiff
path: root/vendor/queries/ocaml/textobjects.scm
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/queries/ocaml/textobjects.scm')
-rw-r--r--vendor/queries/ocaml/textobjects.scm37
1 files changed, 37 insertions, 0 deletions
diff --git a/vendor/queries/ocaml/textobjects.scm b/vendor/queries/ocaml/textobjects.scm
new file mode 100644
index 00000000..9e6bb2cd
--- /dev/null
+++ b/vendor/queries/ocaml/textobjects.scm
@@ -0,0 +1,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