Merge pull request #20 from akash-akya/elixir-version

Show Elixir version in the modeline
This commit is contained in:
Vincent Zhang 2018-08-23 10:37:41 +08:00 committed by GitHub
commit 558ca30cdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1135,6 +1135,10 @@ See `mode-line-percent-position'.")
(lambda () (lambda ()
(when (and (executable-find "go") (executable-find "cut") (executable-find "tr") (executable-find "sed")) (when (and (executable-find "go") (executable-find "cut") (executable-find "tr") (executable-find "sed"))
(setq doom-modeline-env-command "go version 2>&1 | cut -d' ' -f3 | tr -d 'go' | sed -n '1p'")))) (setq doom-modeline-env-command "go version 2>&1 | cut -d' ' -f3 | tr -d 'go' | sed -n '1p'"))))
(add-hook 'elixir-mode-hook
(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'"))))
;; Ensure modeline is inactive when Emacs is unfocused (and active otherwise) ;; Ensure modeline is inactive when Emacs is unfocused (and active otherwise)