                   (unbind-key "M-." js2-mode-map)
                   (add-hook 'xref-backend-functions #'xref-js2-xref-backend nil t))
 
-                (js2-refactor-mode 1)
-                (js2r-add-keybindings-with-prefix "C-c r"))))
+                (use-package js2-refactor
+                  :config
+                  (js2-refactor-mode 1)
+                  (js2r-add-keybindings-with-prefix "C-c r"))
+
+                (use-package js2-imenu-extras
+                  :config
+                  (js2-imenu-extras-mode 1)))))
 
 ;; TypeScript
 (use-package typescript-mode
   :config
-  (add-hook 'typescript-mode-hook
-            #'(lambda ()
-                (use-package ts-comint
-                  :config
-                  (bind-keys :map typescript-mode-map
-                             ("C-x C-e" . ts-send-last-sexp)
-                             ("C-M-x"   . ts-send-last-sexp-and-go)
-                             ("C-c b"   . ts-send-buffer)
-                             ("C-c C-b" . ts-send-buffer-and-go)
-                             ("C-c l"   . ts-load-file-and-go)))
-                (flycheck-mode 1))))
+  (add-hook 'typescript-mode-hook #'my-load-flycheck))
 
 (use-package tide
   :after typescript-mode

              (use-package py-isort
                :config
                (bind-keys :map python-mode-map
                           ("C-c s" . py-isort-buffer)))

              (use-package anaconda-mode
                :config
                (anaconda-mode 1)
                (anaconda-eldoc-mode 1)
                (add-to-list 'company-backends '(company-anaconda :with company-capf))
                (bind-key "M-d" 'anaconda-mode-show-doc anaconda-mode-map))))

;; Go
(use-package go-mode


;; Lisp
(dolist (hook '(lisp-mode-hook))
  (add-hook hook #'my-load-flycheck))

(bind-keys :map emacs-lisp-mode-map
           ("C-c e c" . emacs-lisp-byte-compile)
           ("C-c e l" . emacs-lisp-byte-compile-and-load))
