From cfe26f31893681fcba36a635546d62ab512524ab Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Wed, 25 Jan 2023 13:00:33 +0100 Subject: [PATCH] Add new java indent rules * lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Check for enum_body_declarations and switch_label. --- lisp/progmodes/java-ts-mode.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index af2b0c1fa8d..8737472e514 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -81,6 +81,7 @@ ((parent-is "annotation_type_body") parent-bol java-ts-mode-indent-offset) ((parent-is "interface_body") parent-bol java-ts-mode-indent-offset) ((parent-is "constructor_body") parent-bol java-ts-mode-indent-offset) + ((parent-is "enum_body_declarations") parent-bol 0) ((parent-is "enum_body") parent-bol java-ts-mode-indent-offset) ((parent-is "switch_block") parent-bol java-ts-mode-indent-offset) ((parent-is "record_declaration_body") parent-bol java-ts-mode-indent-offset) @@ -93,6 +94,7 @@ ((parent-is "variable_declarator") parent-bol java-ts-mode-indent-offset) ((parent-is "method_invocation") parent-bol java-ts-mode-indent-offset) ((parent-is "switch_rule") parent-bol java-ts-mode-indent-offset) + ((parent-is "switch_label") parent-bol java-ts-mode-indent-offset) ((parent-is "ternary_expression") parent-bol java-ts-mode-indent-offset) ((parent-is "lambda_expression") parent-bol java-ts-mode-indent-offset) ((parent-is "element_value_array_initializer") parent-bol java-ts-mode-indent-offset) -- 2.39.2