July 7th, 2024

Modern Emacs TypeScript Web Config

Setting up modern Emacs config for TypeScript web dev includes lsp-mode, Treesitter, Tailwind, TSX support, multiple LSP servers, Corfu completion, flycheck linter, eslint, Tailwind LSP, lsp-doctor, and Emacs LSP Booster.

Read original articleLink Icon
Modern Emacs TypeScript Web Config

This article discusses setting up a modern Emacs configuration for TypeScript web development with features like lsp-mode, treesitter, Tailwind, and TSX support. The author highlights the need for multiple LSP server support and efficient TSX parsing using Treesitter. They delve into setting up completion with Corfu, linter support with flycheck, and configuring lsp-mode for features like code actions and diagnostics. Additionally, the article covers setting up eslint, integrating Tailwind LSP server, and optimizing LSP performance using lsp-doctor and specific settings. The author also mentions Emacs LSP Booster as a solution to improve performance by asynchronously converting JSON. The article provides detailed code snippets and configurations for each setup step, aiming to enhance the Emacs environment for modern web development.

Link Icon 3 comments
By @kkzz99 - 5 months
Great article! I'm currently using doom + lsp-mode with ts-lsp and tailwindcss-lsp. It works great, but as the author said the performance could be better, especially tailwindcss-lsp which routinely freezes emacs on longer classnames. Does anyone know if I can use this setup with doom, or will there be any issues in regards to config conflicts? I don't want to leave the convenience of doom for other things.
By @G3rn0ti - 5 months
> (use-package treesit

What’s the use of this package? Isn’t Treesitter built in Emacs (at least if compiled with tree sitter support)?