From: Theodor Thornhill Date: Fri, 13 Jan 2023 10:33:58 +0000 (+0100) Subject: Fix indentation of some declarations and statements X-Git-Tag: emacs-29.0.90~734 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=10032f424ccf611783f5b92742e91e70595587c4;p=emacs.git Fix indentation of some declarations and statements * lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add new rules so that we don't anchor at col 0. --- diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index 86e753c5f53..1d704f16b47 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -85,6 +85,10 @@ ((parent-is "record_declaration_body") parent-bol java-ts-mode-indent-offset) ((query "(method_declaration (block _ @indent))") parent-bol java-ts-mode-indent-offset) ((query "(method_declaration (block (_) @indent))") parent-bol java-ts-mode-indent-offset) + ((parent-is "local_variable_declaration") parent-bol java-ts-mode-indent-offset) + ((parent-is "expression_statement") parent-bol java-ts-mode-indent-offset) + ((parent-is "field_declaration") parent-bol java-ts-mode-indent-offset) + ((parent-is "return_statement") parent-bol java-ts-mode-indent-offset) ((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)