From 26b493fe6502a6557994dbb0acf29a9738607916 Mon Sep 17 00:00:00 2001 From: Ricardo Martins <1706+meqif@users.noreply.github.com> Date: Sun, 9 Dec 2018 12:29:40 +0000 Subject: [PATCH] Show Rust version in the modeline --- doom-modeline.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doom-modeline.el b/doom-modeline.el index 2eba58e..e09e03f 100644 --- a/doom-modeline.el +++ b/doom-modeline.el @@ -1608,6 +1608,10 @@ mouse-3: Describe current input method") (lambda () (when (and (executable-find "iex") (executable-find "cut") (executable-find "sed")) (setq doom-modeline-env-command "iex --version 2>&1 | cut -d' ' -f2 | sed -n '1p'")))) +(add-hook 'rust-mode-hook + (lambda () + (when (and (executable-find "rustc") (executable-find "cut") (executable-find "sed")) + (setq doom-modeline-env-command "rustc --version 2>&1 | cut -d' ' -f2 | sed -n '1p'")))) ;; Ensure modeline is inactive when Emacs is unfocused (and active otherwise)