doomemacs/modules/lang/rust/config.el

31 lines
916 B
EmacsLisp
Raw Normal View History

;;; lang/rust/config.el -*- lexical-binding: t; -*-
2015-09-30 12:28:52 -04:00
(after! rust-mode
(set-env! "RUST_SRC_PATH")
(set-docsets! 'rust-mode "Rust")
(setq rust-indent-method-chain t)
(map! :map rust-mode-map
:localleader
:prefix "b"
:desc "cargo build" "b" (λ! (compile "cargo build --color always"))
:desc "cargo check" "c" (λ! (compile "cargo check --color always"))
:desc "cargo run" "r" (λ! (compile "cargo run --color always"))
:desc "cargo test" "t" (λ! (compile "cargo test --color always"))))
2015-09-30 12:28:52 -04:00
(def-package! racer
:after rust-mode
:config
(add-hook 'rust-mode-hook #'racer-mode)
(set-lookup-handlers! 'rust-mode :async t
:definition #'racer-find-definition
:documentation #'racer-describe))
2017-02-19 18:57:16 -05:00
(def-package! flycheck-rust
:when (featurep! :feature syntax-checker)
2017-09-19 05:07:24 +02:00
:after rust-mode
:config (add-hook 'rust-mode-hook #'flycheck-rust-setup))
2015-09-30 12:28:52 -04:00