summaryrefslogtreecommitdiffstats
path: root/lisp/init-rust.el
blob: ce55e14d9ed207053bb959de87dce8131ba70024 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(use-package rust-mode
  :ensure t
  :init
  (when (executable-find "rustfmt")
    (setq rust-format-on-save t))

  :bind (:map rust-mode-map
              ;; C-c f runs rustfmt on the buffer
              ("C-c f" . rust-format-buffer)
              ("C-c l" . rust-clippy)
              ("C-c t" . rust-test)
              ("C-c R" . rust-run)))

(provide 'init-rust)