diff options
author | JJ | 2024-02-29 01:49:10 +0000 |
---|---|---|
committer | GitHub | 2024-02-29 01:49:10 +0000 |
commit | e51a1e4e2ae99b8e1ad751e7dfa024a7d0e4ba8f (patch) | |
tree | cc8edd4fd6a809aa593716c46d15a515bcbbcd9e /runtime/queries/nim/textobjects.scm | |
parent | 1143f4795414c26382a5647f2be8c20a7a62ada4 (diff) |
Switch Nim tree-sitter queries to alaviss/tree-sitter-nim (#9722)
Diffstat (limited to 'runtime/queries/nim/textobjects.scm')
-rw-r--r-- | runtime/queries/nim/textobjects.scm | 44 |
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 |