diff options
author | Alan Pearce | 2021-01-28 15:55:23 +0100 |
---|---|---|
committer | Alan Pearce | 2021-01-28 15:55:23 +0100 |
commit | a4d0a3c574f960ef1304c6f01f56cbb0e96aa014 (patch) | |
tree | baa3188e38c11a75b62f5be32897200ed99dc2f8 /user | |
parent | c5500d5c4506db90268c1d1a1bbbfab8e1109e1e (diff) | |
download | nixfiles-a4d0a3c574f960ef1304c6f01f56cbb0e96aa014.tar.lz nixfiles-a4d0a3c574f960ef1304c6f01f56cbb0e96aa014.tar.zst nixfiles-a4d0a3c574f960ef1304c6f01f56cbb0e96aa014.zip |
Emacs: open tsx files via typescript-mode by default
Diffstat (limited to 'user')
-rw-r--r-- | user/emacs/init.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el index a4703069..51356dd9 100644 --- a/user/emacs/init.el +++ b/user/emacs/init.el @@ -707,7 +707,11 @@ _p_rev _u_pper _=_: upper/lower _r_esolve js-enabled-frameworks '(javascript)) ;;;; typescript -(setq typescript-indent-level 2) +(use-package typescript-mode + :mode (("\\.tsx\\'" . typescript-mode)) + :config (progn + (setq typescript-indent-level 2))) + (autoload 'ansi-color-apply-on-region "ansi-color") (defun colorise-compilation-buffer () (ansi-color-apply-on-region compilation-filter-start (point-max))) @@ -803,7 +807,7 @@ _p_rev _u_pper _=_: upper/lower _r_esolve :config (setq org-journal-date-format "%A, %d %B %Y" org-journal-dir "~/Documents/journal")) -;;;; web modes (tsx, html) +;;;; web modes (html) (use-package css-mode :defer t @@ -811,8 +815,7 @@ _p_rev _u_pper _=_: upper/lower _r_esolve (setq css-indent-offset 2))) (use-package web-mode - :mode (("\\.tsx\\'" . web-mode) - ("\\.html?\\'" . web-mode)) + :mode (("\\.html?\\'" . web-mode)) :config (setq web-mode-enable-auto-pairing nil web-mode-code-indent-offset 2 web-mode-markup-indent-offset 2 |