From 8c755bab7cd8d51552c0d830ff435eaf38fd8583 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 14 May 2016 16:35:14 -0400 Subject: [PATCH] additional rust packages --- dotfiles/emacs.d/init.el | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/init.el b/dotfiles/emacs.d/init.el index de526459..b35f00a9 100644 --- a/dotfiles/emacs.d/init.el +++ b/dotfiles/emacs.d/init.el @@ -2425,7 +2425,30 @@ items follow a style that is consistent with other prog-modes." (add-hook 'after-save-hook 'go-mode-install-current-project))) (use-package rust-mode - :mode (("\\.rs\\'" . rust-mode))) + :mode (("\\.rs\\'" . rust-mode)) + :preface + (progn + (defun imalison:rust-mode-hook () + (racer-mode))) + :config + (progn + (use-package flycheck-rust + :demand t + :config + (progn + (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) + (use-package emacs-racer + :demand t + :config + (progn + (setq racer-cmd "~/.cargo/bin/racer") + (setq racer-rust-src-path "~/Projects/rust/src"))) + (use-package cargo-mode + :demand t + :config + (progn + (add-hook 'rust-mode-hook 'cargo-minor-mode))) + (add-hook 'rust-mode-hook 'imalison:rust-mode-hook))) (use-package yaml-mode :mode (("\\.yaml\\'" . yaml-mode)