diff options
author | Lennard Hofmann | 2022-11-26 16:17:10 +0000 |
---|---|---|
committer | GitHub | 2022-11-26 16:17:10 +0000 |
commit | fc811726e0e74dd6597f1ebbbd095901b8a78a3e (patch) | |
tree | 8b556487ee8afef327226b73385eb783b3c09467 /runtime/queries/java/textobjects.scm | |
parent | 8529d756fad2eeea543b487e1ff5253857bc2e16 (diff) |
Update tree-sitter-java and add Java textobjects (#4886)
Diffstat (limited to 'runtime/queries/java/textobjects.scm')
-rw-r--r-- | runtime/queries/java/textobjects.scm | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/runtime/queries/java/textobjects.scm b/runtime/queries/java/textobjects.scm new file mode 100644 index 00000000..a932c793 --- /dev/null +++ b/runtime/queries/java/textobjects.scm @@ -0,0 +1,35 @@ +(method_declaration + body: (_) @function.inside) @function.around + +(interface_declaration + body: (_) @class.inside) @class.around + +(class_declaration + body: (_) @class.inside) @class.around + +(record_declaration + body: (_) @class.inside) @class.around + +(enum_declaration + body: (_) @class.inside) @class.around + +(formal_parameters + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +(type_parameters + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +(type_arguments + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +(argument_list + ((_) @parameter.inside . ","? @parameter.around) @parameter.around) + +[ + (line_comment) + (block_comment) +] @comment.inside + +(line_comment)+ @comment.around + +(block_comment) @comment.around |