-
-
Save jaemskyle/b49889299291f45d2aeb999b70491db3 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)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment