mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-06 20:37:44 +03:00
Update tree-sitter-java and add Java textobjects (#4886)
This commit is contained in:
parent
8529d756fa
commit
fc811726e0
5 changed files with 55 additions and 5 deletions
35
runtime/queries/java/textobjects.scm
Normal file
35
runtime/queries/java/textobjects.scm
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue