mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-12 15:36:53 -05:00
Add doom-env-version-hook
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
;;; defuns-spaceline.el
|
||||
|
||||
(defvar doom-env-version-hook '()
|
||||
"Hook that runs whenever the environment version changes (e.g. rbenv/pyenv)")
|
||||
|
||||
;;;###autoload
|
||||
(defun doom|spaceline-env-update ()
|
||||
(when doom--env-command
|
||||
@@ -7,7 +10,8 @@
|
||||
(let ((s (shell-command-to-string doom--env-command)))
|
||||
(setq doom--env-version (if (string-match "[ \t\n\r]+\\'" s)
|
||||
(replace-match "" t t s)
|
||||
s))))))
|
||||
s))
|
||||
(run-hook-with-args 'doom-env-version-hook doom--env-version)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun doom/-flycheck-count (state)
|
||||
|
Reference in New Issue
Block a user