blob: d56d37b69f91835d5a9c62dcf8d5fee5cbf5c6ed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
(defun rust-mode-buffer-local-variables ()
;; eglot passes tab-width as tab size when formatting code, when using rustfmt
;; this should be 4
(setq-local tab-width 4))
(use-package rust-mode
:ensure t
:hook (rust-mode . rust-mode-buffer-local-variables)
:bind (:map rust-mode-map
("C-c l" . rust-clippy)
("C-c t" . rust-test)
("C-c R" . rust-run)))
(provide 'init-rust)
|