Last active
December 11, 2024 18:33
-
-
Save gsj987/64d48bf49a374c96421ad20df886e947 to your computer and use it in GitHub Desktop.
Make eglot support tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (define-derived-mode typescriptreact-mode web-mode "TypescriptReact" | |
| "A major mode for tsx.") | |
| (use-package typescript-mode | |
| :mode (("\\.ts\\'" . typescript-mode) | |
| ("\\.tsx\\'" . typescriptreact-mode))) | |
| (use-package eglot | |
| :ensure t | |
| :defer 3 | |
| :hook | |
| ((js-mode | |
| typescript-mode | |
| typescriptreact-mode) . eglot-ensure) | |
| :config | |
| (cl-pushnew '((js-mode typescript-mode typescriptreact-mode) . ("typescript-language-server" "--stdio")) | |
| eglot-server-programs | |
| :test #'equal)) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks for your comment, i've fixed it according your feedback. 👍