summaryrefslogtreecommitdiff
path: root/runtime/queries/nim/textobjects.scm
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/queries/nim/textobjects.scm')
-rw-r--r--runtime/queries/nim/textobjects.scm44
1 files changed, 29 insertions, 15 deletions
diff --git a/runtime/queries/nim/textobjects.scm b/runtime/queries/nim/textobjects.scm
index 943aa7f0..eaa3e8e8 100644
--- a/runtime/queries/nim/textobjects.scm
+++ b/runtime/queries/nim/textobjects.scm
@@ -1,19 +1,33 @@
-(routine
- (block) @function.inside) @function.around
+(proc_declaration
+ body: (_) @function.inside) @function.around
+(func_declaration
+ body: (_) @function.inside) @function.around
+(iterator_declaration
+ body: (_) @function.inside) @function.around
+(converter_declaration
+ body: (_) @function.inside) @function.around
+(method_declaration
+ body: (_) @function.inside) @function.around
+(template_declaration
+ body: (_) @function.inside) @function.around
+(macro_declaration
+ body: (_) @function.inside) @function.around
-; @class.inside (types?)
-; @class.around
+(type_declaration (_) @class.inside) @class.around
-; paramListSuffix is strange and i do not understand it
-(paramList
- (paramColonEquals) @parameter.inside) @parameter.around
+(parameter_declaration
+ (symbol_declaration_list) @parameter.inside) @parameter.around
-(comment) @comment.inside
-(multilineComment) @comment.inside
-(docComment) @comment.inside
-(multilineDocComment) @comment.inside
+[
+ (comment)
+ (block_comment)
+ (documentation_comment)
+ (block_documentation_comment)
+] @comment.inside
-(comment)+ @comment.around
-(multilineComment) @comment.around
-(docComment)+ @comment.around
-(multilineDocComment) @comment.around
+[
+ (comment)+
+ (block_comment)
+ (documentation_comment)+
+ (block_documentation_comment)+
+] @comment.around