Closed YievCkim closed 3 months ago
I just checked the keybindings I have for my personal setup, vs emacs loaded with --no-init-file
.
It seems somewhere in my init-file I've bound RET
to newline-and-indent
(probably for all prog-modes) and then you get the behaviour you want.
Unfortunately, the default for typescript-ts-mode
is just that RET
is bound to newline
.
We should fix this upstream in Emacs, but in the meantime you can work around that bug by adding that binding manually in your init file.
Hello @josteink thank you for the trick.
I didn't realize that typescript-ts-mode was provided directly by emacs (Correct me If I am wrong) In fact a fix has been made along these lines. But despite what is indicated in the report, it does not yet seem to be available on version 29.3.
I hope to see it soon (I am using emacs from a nix package, I guess 29.4 will come soon).
I went back to classic typescript-mode but I will try newline-and-indent
tomorrow I think.
Thanks again.
I have to indicate in the (emacs) bug report the missing fix announced in 29.3, too. I will do that tomorrow.
Yes typescript-ts-mode is now a core part of Emacs. Yay!
I'm on vacation now, but just to remind myself to get this fixed later, I registered a bug for this particular aspect here:
I am on emacs 29 with treesitter enabled.
on typescript-mode interface is indented as expected like this:
but with typescript-ts-mode no indentation is added into the interface:
It's too bad because color highlighting is better in this mode.