I recently picked up a new project that uses React. Out of the box, my configuration doesn’t seem to be doing very well – indentation is erratic (sometimes thrown off by JSX), no lsp-rename
, and generally things are slow.
Are there any generally recommended approaches for React development with Emacs? Language server, minor modes, tree-sitter, etc? There seem to be a lot of options and modes available.
The codebase is currently JavaScript and JSX, but I’m considering Typescript and TSX down the line. Should I just default to the TypeScript tooling?
web-mode is well suited for most web dev.
I used it extensively for vue.js (html/css/typescript in the same file) and it worked well. Pretty sure it should be fine for typescript + jsx
As for the language server, it seems that typescript-language-server is the way to go (see)
Give it a try, i’m pretty sure that those two things will cover 90% of your needs
emacs.zeef.com is your friend.