emacs.d/modules/jenga-rust.el

27 lines
660 B
EmacsLisp
Raw Normal View History

2019-12-07 23:09:25 +01:00
;;;; Rust mode configuration.
;; Add rust load hooks.
2020-01-05 23:51:24 +01:00
(use-package cargo)
(use-package flycheck-rust)
2019-12-07 23:09:25 +01:00
2020-01-05 23:51:24 +01:00
(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))
2019-12-07 23:09:25 +01:00
2020-01-05 23:51:24 +01:00
(use-package racer
:hook
(racer-mode . eldoc-mode)
(racer-mode . company-mode))
2019-12-08 21:56:34 +01:00
2020-01-05 23:51:24 +01:00
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup)
2019-12-07 23:09:25 +01:00
(provide 'jenga-rust)