Created
September 21, 2017 13:45
-
-
Save cbilson/b00820c3a69aa2a2d63bbfcb3aefa97e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun cbilson/rust-mode-hook () | |
(interactive) | |
(message "cbilson/rust-mode-hook...") | |
(cargo-minor-mode) | |
(local-set-key (kbd "C-c <tab>") #'rust-format-buffer) | |
(racer-mode +1) | |
(message "cbilson/rust-mode-hook: done")) | |
(use-package rust-mode | |
:init | |
(add-hook 'rust-mode-hook #'cbilson/rust-mode-hook) | |
:config | |
(use-package cargo) | |
(use-package racer | |
:init | |
(setq racer-cmd (concat (getenv "HOME") "/.cargo/bin/racer") | |
racer-rust-src-path (concat (getenv "HOME") "/src/rust/src")) | |
(add-hook 'racer-mode-hook #'eldoc-mode) | |
(add-hook 'racer-mode-hook #'company-mode)) | |
(use-package flycheck-rust | |
:init | |
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment