doomemacs/modules/module-rust.el

26 lines
726 B
EmacsLisp
Raw Normal View History

2015-10-01 00:28:52 +08: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")
(def-builder! toml-mode "cargo run" "Cargo.toml"))
2015-10-01 00:28:52 +08:00
2016-05-25 10:15:44 +08:00
(use-package flycheck-rust
:after rust-mode)
2016-05-25 12:10:26 +08:00
(defvar racer-cmd (concat doom-ext-dir "/racer"))
(defvar racer-rust-src-path (concat doom-ext-dir "/rust/src/"))
(use-package racer
:after rust-mode
2016-05-11 17:36:49 +08: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-10-01 00:28:52 +08:00
(provide 'module-rust)
;;; module-rust.el ends here