aboutsummaryrefslogtreecommitdiffstats
path: root/local-lib/rust-conf.el
blob: 8cc246944ae96966fe53f14b93f17e21d383e41f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
;;; rust-conf.el --- configuration for the rust language
;; Author: jason <jason@zzq.org>
;; Created: 16 Jun 2017
;;; Commentary:
;;
;; Installation:
;; * Install Rust: https://www.rust-lang.org/en-US/install.html
;; * Install Racer: https://github.com/racer-rust/racer
;; * Install the Rust source: rustup component add rust-src - This goes to:
;;   ~/.multirust/toolchains/[toolchain]/lib/rustlib/src/rust/src
;; * Define the RUST_SRC_PATH environment var to the source directory
;;
;;; Code:
(use-package rust-mode
  :ensure t
  :commands (rust-mode))

(use-package cargo
  :ensure t
  :commands (cargo-minor-mode))

(use-package racer
  :ensure t
  :commands (racer-mode))

(add-hook 'rust-mode-hook (lambda ()
			    (progn
			      (racer-mode)
			      (cargo-minor-mode))))
(add-hook 'racer-mode-hook #'company-mode)

(provide 'rust-conf)