From a2a7ed1d15aed8094f1f73d38f20113c99a793f9 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 9 Jun 2016 13:10:50 -0700 Subject: [PATCH] move rust-mode --- dotfiles/emacs.d/README.org | 56 +++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 4d434cc5..794ee8cc 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -1264,6 +1264,35 @@ I use helm for almost all emacs completion (interactive) (delete-process "tern")) #+END_SRC +*** rust +#+BEGIN_SRC emacs-lisp + (use-package rust-mode + :mode (("\\.rs\\'" . rust-mode)) + :preface + (progn + (defun imalison:rust-mode-hook () + (imalison:make-imenu-index-flat) + (racer-mode))) + :config + (progn + (use-package flycheck-rust + :demand t + :config + (progn + (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) + (use-package racer + :demand t + :config + (progn + (setq racer-cmd "~/.cargo/bin/racer") + (setq racer-rust-src-path "~/Projects/rust/src"))) + (use-package cargo + :demand t + :config + (progn + (add-hook 'rust-mode-hook 'cargo-minor-mode))) + (add-hook 'rust-mode-hook 'imalison:rust-mode-hook))) +#+END_SRC * Keybindings #+BEGIN_SRC emacs-lisp (bind-key "M-q" 'fill-or-unfill-paragraph) @@ -2411,33 +2440,6 @@ I use helm for almost all emacs completion ;; other modes ;; ============================================================================= - (use-package rust-mode - :mode (("\\.rs\\'" . rust-mode)) - :preface - (progn - (defun imalison:rust-mode-hook () - (imalison:make-imenu-index-flat) - (racer-mode))) - :config - (progn - (use-package flycheck-rust - :demand t - :config - (progn - (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) - (use-package racer - :demand t - :config - (progn - (setq racer-cmd "~/.cargo/bin/racer") - (setq racer-rust-src-path "~/Projects/rust/src"))) - (use-package cargo - :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) ("\\.yml\\'" . yaml-mode)))