Mercurial > dotfiles
changeset 397:98484e1f564f
rust: lots of new configs to make working with rust code easy
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Mon, 27 Jun 2016 16:27:46 -0400 |
parents | 980b3df541cd |
children | 1cda3348f36b |
files | .elisp/settings/00.bootstrap.el .elisp/settings/99.rust.el .shell.d/99.rust.sh |
diffstat | 3 files changed, 33 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/.elisp/settings/00.bootstrap.el +++ b/.elisp/settings/00.bootstrap.el @@ -29,6 +29,7 @@ http-twiddle ipython nose + use-package ;; disabled until I don't need a modified version ;; textmate @@ -51,6 +52,13 @@ auto-complete go-autocomplete go-eldoc + ;; rust + rust-mode + rustfmt + cargo + racer + company-racer + flycheck-rust )) (unless (or (member pack package-activated-list) (functionp pack))
new file mode 100644 --- /dev/null +++ b/.elisp/settings/99.rust.el @@ -0,0 +1,23 @@ +(use-package rust-mode + :config (add-hook 'rust-mode-hook + (lambda () + (local-set-key (kbd "C-c <tab>") #'rust-format-buffer)))) + +(use-package cargo + :config (add-hook 'rust-mode-hook 'cargo-minor-mode)) + +(use-package company + :init + (use-package racer + :init + (add-hook 'rust-mode-hook #'racer-mode) + (add-hook 'racer-mode-hook #'eldoc-mode) + (add-hook 'racer-mode-hook #'company-mode) + (setq company-tooltip-align-annotations t) + )) + +(use-package flycheck-rust + :init + (add-hook 'flycheck-mode-hook #'flycheck-rust-setup) + (add-hook 'rust-mode-hook 'flycheck-mode) + )