doomemacs/modules/module-rust.el

27 lines
728 B
EmacsLisp
Raw Normal View History

2015-09-30 12:28:52 -04:00
;;; module-rust.el
(use-package rust-mode
:mode "\\.rs$"
:config
(define-builder! rust-mode "cargo run" "Cargo.toml")
2015-10-18 02:28:36 -04:00
(define-builder! toml-mode "cargo run" "Cargo.toml")
2015-10-08 01:48:47 -04:00
2015-09-30 12:28:52 -04:00
(use-package flycheck-rust
:config (add-hook! rust-mode 'flycheck-mode))
(use-package racer
2016-03-29 23:13:31 -04:00
:preface
2016-03-27 00:46:52 -04:00
(setq racer-cmd (concat narf-ext-dir "/racer")
racer-rust-src-path (concat narf-ext-dir "/rust/src/"))
2016-03-29 23:13:31 -04:00
:when (file-exists-p racer-cmd)
:config
(map! :map rust-mode-map :m "gd" 'racer-find-definition)
;; TODO Unit test keybinds
2015-09-30 12:28:52 -04:00
2015-10-08 01:48:47 -04:00
(add-hook! rust-mode '(racer-mode eldoc-mode flycheck-rust-setup))
2015-10-14 03:39:32 -04:00
(define-company-backend! rust-mode (racer))))
2015-09-30 12:28:52 -04:00
(provide 'module-rust)
;;; module-rust.el ends here