Commit fceb60609db1
dots/config/emacs/init.el
@@ -739,11 +739,17 @@ minibuffer, even without explicitly focusing it."
(sh-mode . eglot-ensure-unless-tramp)
(sh-script-mode . eglot-ensure-unless-tramp)
(org-mode . eglot-ensure-unless-tramp)
- (markdown-mode . eglot-ensure-unless-tramp))
+ (markdown-mode . eglot-ensure-unless-tramp)
+ (js-ts-mode . eglot-ensure-unless-tramp)
+ (typescript-ts-mode . eglot-ensure-unless-tramp)
+ (tsx-ts-mode . eglot-ensure-unless-tramp))
(setq major-mode-remap-alist
'((python-mode . python-ts-mode)
- (go-mode . go-ts-mode)))
+ (go-mode . go-ts-mode)
+ (javascript-mode . js-ts-mode)
+ (js-mode . js-ts-mode)
+ (typescript-mode . typescript-ts-mode)))
(use-package markdown-mode
:mode (("README\\.md\\'" . gfm-mode)
@@ -800,6 +806,19 @@ minibuffer, even without explicitly focusing it."
:if (executable-find "terraform-ls")
:mode ("\\.tf\\'" "\\.tfvars\\'"))
+(use-package js-ts-mode
+ :mode (("\\.js\\'" . js-ts-mode)
+ ("\\.mjs\\'" . js-ts-mode)
+ ("\\.cjs\\'" . js-ts-mode)))
+
+(use-package typescript-ts-mode
+ :mode (("\\.ts\\'" . typescript-ts-mode)
+ ("\\.mts\\'" . typescript-ts-mode)
+ ("\\.cts\\'" . typescript-ts-mode)))
+
+(use-package tsx-ts-mode
+ :mode ("\\.tsx\\'" "\\.jsx\\'"))
+
(use-package nix-drv-mode
:if (executable-find "nix")
:after nix-mode
home/common/dev/emacs.nix
@@ -153,7 +153,6 @@ let
trashed
treesit-fold
treesit-grammars.with-all-grammars # see how much it weight
- typescript-mode
# vc-jj
verb
# vertico