Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'runtime/queries/gren/textobjects.scm')
-rw-r--r--runtime/queries/gren/textobjects.scm56
1 files changed, 56 insertions, 0 deletions
diff --git a/runtime/queries/gren/textobjects.scm b/runtime/queries/gren/textobjects.scm
new file mode 100644
index 00000000..38565784
--- /dev/null
+++ b/runtime/queries/gren/textobjects.scm
@@ -0,0 +1,56 @@
+
+(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
+ (record_pattern
+ (lower_pattern
+ (lower_case_identifier) @parameter.inside
+ )
+ ) @parameter.around
+ )
+)
+
+(parenthesized_expr
+ (anonymous_function_expr
+ (
+ (backslash)
+ (pattern) @parameter.inside
+ (arrow)
+ )
+ )
+)