 (use-package tide :ensure t
   :after web-mode
   :config
-  (add-to-list 'auto-mode-alist '("\\.tsx\\'" . web-mode))
   (add-hook 'js2-mode-hook #'ar/setup-tide-mode)
   (add-hook 'web-mode-hook
             (lambda ()
               (when (string-equal "tsx" (file-name-extension buffer-file-name))
-                (ar/setup-tide-mode)))))
+                (ar/setup-tide-mode))))
+  :mode (("\\.tsx\\'" . web-mode)))
 
 (use-package company-flow :ensure t)
 

(use-package requirejs :ensure t)

(use-package rjsx-mode :ensure t
  :config
  (add-to-list 'auto-mode-alist '("\\.js$" . rjsx-mode))
  (add-to-list 'auto-mode-alist '("\\.jsx$" . rjsx-mode))
  (add-hook #'js2-mode-hook #'ar/js2-mode-hook-function))

;; Disabling in favor of rjsx-mode.

  (set-face-attribute 'objc-font-lock-function-name nil :foreground "#dcdcdc")
  (validate-setq objc-font-lock-background-face nil))

(use-package dummy-h-mode :ensure t
  :mode(("\\.h\\'" . dummy-h-mode)))

(use-package go-eldoc :ensure t
  :commands go-eldoc-setup)
