From a4d0a3c574f960ef1304c6f01f56cbb0e96aa014 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 28 Jan 2021 15:55:23 +0100 Subject: Emacs: open tsx files via typescript-mode by default --- user/emacs/init.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'user') 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 -- cgit 1.4.1