]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix indentation of some declarations and statements
authorTheodor Thornhill <theo@thornhill.no>
Fri, 13 Jan 2023 10:33:58 +0000 (11:33 +0100)
committerTheodor Thornhill <theo@thornhill.no>
Sat, 14 Jan 2023 11:32:59 +0000 (12:32 +0100)
* lisp/progmodes/java-ts-mode.el (java-ts-mode--indent-rules): Add new
rules so that we don't anchor at col 0.

lisp/progmodes/java-ts-mode.el

index 86e753c5f53f5e5eb8d1a81f8e117b64f2cbaa56..1d704f16b473d9969b5bd54396c24fb6c56b7637 100644 (file)
      ((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)