 
 ;; TypeScript
 (use-package typescript-mode
-  :mode ("\\.ts\\'"))
+  :config
+  (define-derived-mode typescript-tsx-mode typescript-mode "TSX"
+    "Major mode for editing TSX files.
+
+Refer to Typescript documentation for syntactic differences between normal and TSX
+variants of Typescript.")
+
+  (add-to-list 'auto-mode-alist '("\\.tsx?\\'" . typescript-tsx-mode))
+
+  (with-eval-after-load 'all-the-icons
+    (add-to-list 'all-the-icons-mode-icon-alist `(typescript-tsx-mode
+                                                  all-the-icons-fileicon "tsx"
+                                                  :v-adjust -0.1 :face all-the-icons-blue-alt))))
 
 (use-package ts-comint
   :after (typescript-mode)

(use-package web-mode
  :functions web-mode-language-at-pos
  :mode ("\\.vue\\'"
         "\\.tsx\\'"
         "\\.handlebars\\'"
         "\\.underscore\\'"
         "\\.html?\\'"

            (lambda ()
              (when (or (member major-mode '(js-jsx-mode js2-jsx-mode rjsx-mode))
                        (and (eq major-mode 'web-mode)
                             (member (web-mode-language-at-pos) '("jsx" ;; "tsx"
                                                                  ))))
                (setq-local emmet-expand-jsx-className? t)))))

;; Project management
