Suppress message when switching python versions with pyenv

This commit is contained in:
Jeremy Isaac Dormitzer 2024-03-20 12:03:18 -04:00
parent 81d1164f58
commit 3394957063

View File

@ -65,15 +65,15 @@
(pyenv--call-process "version-alias-file")))
(global-pyenv-mode)
(defun pyenv-switch-buffer-hook (prev curr)
(pyenv-use-corresponding))
(defun pyenv-use-corresponding-vterm-hook ()
(when (eq major-mode 'vterm-mode)
(vterm-send-C-e)
(vterm-send-C-u)
(vterm-send-string (format "export PYENV_VERSION=%s\n" (getenv "PYENV_VERSION")))))
(shut-up (pyenv-use-corresponding)))
;; (defun pyenv-use-corresponding-vterm-hook ()
;; (when (eq major-mode 'vterm-mode)
;; (vterm-send-C-e)
;; (vterm-send-C-u)
;; (vterm-send-string (format "export PYENV_VERSION=%s\n" (getenv "PYENV_VERSION")))))
(add-hook 'switch-buffer-functions #'pyenv-switch-buffer-hook)
(add-hook 'eshell-directory-change-hook #'pyenv-use-corresponding)
(add-hook 'pyenv-mode-hook #'pyenv-use-corresponding-vterm-hook)
;; (add-hook 'pyenv-mode-hook #'pyenv-use-corresponding-vterm-hook)
:custom
(pyenv-show-active-python-in-modeline nil))