From 78c34194b5c83beb26ca04f12bf9d53fd5aba801 Mon Sep 17 00:00:00 2001 From: melted-brownie Date: Sat, 17 Feb 2024 16:09:21 +0000 Subject: Improve textobjects for parameter/argument for Dart (#9644) Co-authored-by: Sébastien Blondiau --- runtime/queries/dart/textobjects.scm | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'runtime/queries/dart/textobjects.scm') diff --git a/runtime/queries/dart/textobjects.scm b/runtime/queries/dart/textobjects.scm index 02827615..b88b97bc 100644 --- a/runtime/queries/dart/textobjects.scm +++ b/runtime/queries/dart/textobjects.scm @@ -56,9 +56,34 @@ (documentation_comment)+ @comment.around -(formal_parameter) @parameter.inside +(formal_parameter_list + ( + (formal_parameter) @parameter.inside . ","? @parameter.around + ) @parameter.around +) + +(optional_formal_parameters + ( + (formal_parameter) @parameter.inside . ","? @parameter.around + ) @parameter.around +) + +(arguments + ( + [ + (argument) @parameter.inside + (named_argument (label) . (_)* @parameter.inside) + ] + . ","? @parameter.around + ) @parameter.around +) -(formal_parameter_list) @parameter.around +(type_arguments + ( + ((_) . ("." . (_) @parameter.inside @parameter.around)?) @parameter.inside + . ","? @parameter.around + ) @parameter.around +) (expression_statement ((identifier) @_name (#any-of? @_name "test" "testWidgets")) -- cgit v1.2.3-70-g09d2