26 lines
660 B
EmacsLisp
26 lines
660 B
EmacsLisp
;;;; Rust mode configuration.
|
|
;; Add rust load hooks.
|
|
(use-package cargo)
|
|
(use-package flycheck-rust)
|
|
|
|
(use-package rust-mode
|
|
:init (add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
|
|
:bind
|
|
("M-." . racer-find-definition)
|
|
("M-h" . racer-describe)
|
|
("M-<tab>" . company-indent-or-complete-common)
|
|
:config
|
|
(setq rust-format-on-save t)
|
|
:hook
|
|
(after-init . global-flycheck-mode)
|
|
(rust-mode . racer-mode)
|
|
(rust-mode . cargo-minor-mode))
|
|
|
|
(use-package racer
|
|
:hook
|
|
(racer-mode . eldoc-mode)
|
|
(racer-mode . company-mode))
|
|
|
|
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup)
|
|
|
|
(provide 'jenga-rust)
|