On Dec 9, 2023 09:26, Eli Zaretskii <eliz@gnu.org> wrote:

> Date: Thu, 30 Nov 2023 16:28:11 -0600
> From:  Spencer Pavkovic via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> If you are in java-ts-mode, attempting to put an opening curly bracket
> '{' on it's own line will not indent the bracket at all.
>
> While I expect it to place the bracket on the same indent level as the
> block (like regular java-mode), it is always far left with 0 tabs.
>
> I did run with emacs -Q and the same thing happened.
>
> // EXPECTED
> public class Thing
> {
>       public Thing()
>       {
>           try
>           {
>               // stuff
>           } catch (Exception e)
>           {
>               // stuff
>           }
>       }
> }
>
> // ACTUAL
> public class Thing
> {
>       public Thing()
> {
>           try
> {
>               // stuff
>           } catch (Exception e)
> {
>               // other stuff
>           }
>      }
> }

Yuan and Theo, any comments?

This can be supported, but no Java code is indented like this, though. But it could make sense to support at least _some_ indentation here. I can take a look at this tonight!

Thanks for the ping :)
Theo