Show Rust version in the modeline

This commit is contained in:
Ricardo Martins 2018-12-09 12:29:40 +00:00 committed by GitHub
parent d7efae1d35
commit 26b493fe65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)