summary refs log tree commit diff
path: root/emacs.d/modules/module-rust.el
blob: a229cc49ad57b0385611e3a43ca92b1fc435068a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
(require 'config-package)

(use-package rust-mode)

(use-package racer)

(use-package cargo
  :hook (rust-mode . cargo-minor-mode)
  :config
  (add-hook 'rust-mode-hook 'racer-mode)
  (add-hook 'rust-mode-hook 'eldoc-mode)
  (setq compilation-ask-about-save nil
        rust-format-on-save t
        rust-rustfmt-bin "/Users/fcuny/.cargo/bin/rustfmt")
  ;; Automatically re-run compilation command on manual save inside a project.
  ;; Will do nothing if a compilation hasn't been manually triggered
  ;; in the past.
  :diminish cargo-minor-mode)

(provide 'module-rust)