radian-software / apheleia

🌷 Run code formatter on buffer contents without moving point, using RCS patches and dynamic programming.
MIT License
558 stars 75 forks source link

Add support for tsx-ts-mode #148

Closed danielpza closed 1 year ago

danielpza commented 1 year ago

Add support for .tsx files (aka react + typescript). tsx-ts-mode is one of the new major modes using tree-sitter in emacs 29

from emacs docs:

tsx-ts-mode is an autoloaded, interactive and natively compiled function defined in typescript-ts-mode.el.gz. Signature (tsx-ts-mode) Documentation Major mode for editing TypeScript. In addition to any hooks its parent mode typescript-ts-base-mode might have run, this mode runs the hook tsx-ts-mode-hook, as the final or penultimate step during initialization.

danielpza commented 1 year ago

That makes sense to me. Can you move the alist entry so it follows alphabetical order, and update the changelog?

Updated!

mrunhap commented 1 year ago

Please add (go-ts-mode . gofmt) too.

danielpza commented 1 year ago

Please add (go-ts-mode . gofmt) too.

I cannot find the docs for go-ts-mode, is this one shipped in emacs-29?