From 8dbd7d5023f27f1c0f244b03f0bc3f7282804677 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 22 Mar 2018 10:48:58 -0700 Subject: [emacs] add support for rust. --- emacs.d/lib/packages.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/emacs.d/lib/packages.el b/emacs.d/lib/packages.el index 1d42e09..9abfdb3 100644 --- a/emacs.d/lib/packages.el +++ b/emacs.d/lib/packages.el @@ -213,6 +213,7 @@ ("python" (mode . python-mode)) ("repl" (name . "repl")) ("ruby" (mode . ruby-mode)) + ("rust" (mode . rust-mode)) ("sh" (mode . sh-mode)) ("text" (mode . text-mode)))))) @@ -375,6 +376,18 @@ :config (setq recentf-save-file (expand-file-name "var/recentf" user-emacs-directory))) +(use-package rust-mode + :ensure t + :config + (use-package cargo + :hook (rust-mode . cargo-minor-mode) + :config + (setq compilation-ask-about-save nil) + ;; Automatically re-run compilation command on manual save inside a project. + ;; Will do nothing if a compilation hasn't been manually triggered + ;; in the past. + :diminish cargo-minor-mode)) + (use-package sh-script ;; configuration to interact with shell scripts :mode ("bashrc" . sh-mode) @@ -390,6 +403,9 @@ ;; install swiper :ensure t) +(use-package toml-mode + :ensure t) + (use-package tramp ;; configuration for tramp :config -- cgit 1.4.1