2024-01-05 03:19:54 +09:00
|
|
|
; format-ignore
|
2021-02-20 18:28:10 +07:00
|
|
|
[
|
2023-06-04 13:28:41 +09:00
|
|
|
; ... refers to the portion that this indent query will have effects on
|
|
|
|
|
(class_body) ; { ... } of `class X`
|
|
|
|
|
(enum_body) ; { ... } of `enum X`
|
|
|
|
|
(interface_body) ; { ... } of `interface X`
|
|
|
|
|
(constructor_body) ; { `modifier` X() {...} } inside `class X`
|
|
|
|
|
(annotation_type_body) ; { ... } of `@interface X`
|
|
|
|
|
(block) ; { ... } that's not mentioned in this scope
|
|
|
|
|
(switch_block) ; { ... } in `switch X`
|
|
|
|
|
(array_initializer) ; [1, 2]
|
|
|
|
|
(argument_list) ; foo(...)
|
|
|
|
|
(formal_parameters) ; method foo(...)
|
|
|
|
|
(annotation_argument_list) ; @Annotation(...)
|
|
|
|
|
(element_value_array_initializer) ; { a, b } inside @Annotation()
|
2023-03-20 14:44:39 -07:00
|
|
|
] @indent.begin
|
2021-02-20 18:28:10 +07:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(expression_statement
|
|
|
|
|
(method_invocation) @indent.begin)
|
2022-04-02 10:49:09 -07:00
|
|
|
|
2021-02-20 18:28:10 +07:00
|
|
|
[
|
|
|
|
|
"("
|
|
|
|
|
")"
|
|
|
|
|
"{"
|
|
|
|
|
"}"
|
|
|
|
|
"["
|
|
|
|
|
"]"
|
2023-03-20 14:44:39 -07:00
|
|
|
] @indent.branch
|
2021-03-01 20:20:37 +07:00
|
|
|
|
2024-01-06 15:05:50 +09:00
|
|
|
(annotation_argument_list
|
|
|
|
|
")" @indent.end) ; This should be a special cased as `()` here doesn't have ending `;`
|
|
|
|
|
|
2023-03-20 14:44:39 -07:00
|
|
|
"}" @indent.end
|
2022-02-24 15:41:15 -08:00
|
|
|
|
2023-03-20 14:44:39 -07:00
|
|
|
(line_comment) @indent.ignore
|
2022-02-28 14:45:18 -08:00
|
|
|
|
2022-02-28 16:31:11 -08:00
|
|
|
[
|
|
|
|
|
(ERROR)
|
|
|
|
|
(block_comment)
|
2023-03-20 14:44:39 -07:00
|
|
|
] @indent.auto
|