doomemacs/modules/module-rust.el

28 lines
771 B
EmacsLisp
Raw Normal View History

2015-09-30 12:28:52 -04:00
;;; module-rust.el
(use-package rust-mode
:mode "\\.rs$"
:init (add-hook 'rust-mode-hook 'flycheck-mode)
:config
(def-builder! rust-mode "cargo run" "Cargo.toml")
2016-05-24 22:09:50 -04:00
(def-builder! toml-mode "cargo run" "Cargo.toml")
(def-docset! rust-mode ("Rust")))
2015-09-30 12:28:52 -04:00
2016-05-24 22:15:44 -04:00
(use-package flycheck-rust
:after rust-mode)
(use-package racer
:after rust-mode
:preface
2016-05-20 22:37:30 -04:00
(setq racer-cmd (concat doom-ext-dir "/racer")
racer-rust-src-path (concat doom-ext-dir "/rust/src/"))
2016-05-11 05:36:49 -04:00
:when (f-exists? racer-cmd)
:init (add-hook! rust-mode '(racer-mode eldoc-mode flycheck-rust-setup))
:config
;; TODO Unit test keybinds
(def-company-backend! rust-mode (racer))
(map! :map rust-mode-map :m "gd" 'racer-find-definition))
2015-09-30 12:28:52 -04:00
(provide 'module-rust)
;;; module-rust.el ends here