 
 (use-package rust-mode :defer
   :init (add-hooks 'rust-mode-hook
-                   #'racer-mode
-                   #'flycheck-rust-setup)
-  :config (use-package flycheck-rust)
+                   #'cargo-minor-mode
+                   #'flycheck-rust-setup
+                   #'racer-mode)
+  :config (use-package cargo)
+  (use-package flycheck-rust)
   (use-package racer)
-  (setq racer-rust-src-path "~/.multirust/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/src/"))
+  (setq racer-rust-src-path "~/.multirust/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/src"))
 
 (use-package js2-mode
   :mode ("\\.js\\'" . js2-mode))

  :config (region-bindings-mode-enable))

(use-package expand-region
  :bind (("H-m SPC" . er/expand-region)
         ("H-m C-SPC" . er/expand-region)
         ("S-SPC" . er/expand-region)))

(use-package company :demand :diminish " K"
  :bind (("H-m RET" . global-company-mode)
         ("H-m <C-return>" . company-complete))
  :config (global-company-mode 1)
  (unbind-key "<tab>" company-active-map)
  (unbind-key "TAB" company-active-map)

  :config (which-key-mode 1))

(use-package avy
  :bind (("C-," . avy-goto-word-1) ("H-m ," . avy-goto-word-1)
         ("C-;" . avy-goto-char-2) ("H-m ;" . avy-goto-char-2)
         ("C-." . avy-pop-mark)    ("H-m ." . avy-pop-mark)
         ("M-g g" . avy-goto-line)
         :map isearch-mode-map
         ("C-." . avy-isearch)))
