diff options
Diffstat (limited to 'local-lib/rust-conf.el')
| -rw-r--r-- | local-lib/rust-conf.el | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/local-lib/rust-conf.el b/local-lib/rust-conf.el new file mode 100644 index 0000000..a0c7b7d --- /dev/null +++ b/local-lib/rust-conf.el | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | ;;; rust-conf.el --- configuration for the rust language | ||
| 2 | ;; Author: jason <jason@zzq.org> | ||
| 3 | ;; Created: 16 Jun 2017 | ||
| 4 | ;;; Commentary: | ||
| 5 | ;; | ||
| 6 | ;; Installation: | ||
| 7 | ;; * Install Rust: https://www.rust-lang.org/en-US/install.html | ||
| 8 | ;; * Install Racer: https://github.com/racer-rust/racer | ||
| 9 | ;; * Install the Rust source: rustup component add rust-src - This goes to: | ||
| 10 | ;; ~/.multirust/toolchains/[toolchain]/lib/rustlib/src/rust/src | ||
| 11 | ;; * Define the RUST_SRC_PATH environment var to the source directory | ||
| 12 | ;; | ||
| 13 | ;;; Code: | ||
| 14 | (use-package rust-mode | ||
| 15 | :ensure t | ||
| 16 | :commands (rust-mode)) | ||
| 17 | |||
| 18 | (use-package cargo | ||
| 19 | :ensure t | ||
| 20 | :commands (cargo-minor-mode)) | ||
| 21 | |||
| 22 | (use-package racer | ||
| 23 | :ensure t | ||
| 24 | :commands (racer-mode)) | ||
| 25 | |||
| 26 | (add-hook 'rust-mode-hook (lambda () | ||
| 27 | (progn | ||
| 28 | (racer-mode) | ||
| 29 | (cargo-minor-mode)))) | ||
| 30 | (add-hook 'racer-mode-hook #'company-mode) | ||
| 31 | |||
| 32 | (provide 'rust-conf) | ||