Emacs: open tsx files via typescript-mode by default
Alan Pearce alan@alanpearce.eu
Thu, 28 Jan 2021 15:55:23 +0100
1 files changed, 7 insertions(+), 4 deletions(-)
jump to
M user/emacs/init.el → user/emacs/init.el
@@ -707,7 +707,11 @@ (setq js-indent-level 2 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 @@ :gfhook (#'variable-pitch-mode) :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 @@ :config (progn (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