Hook up pyenv-mode to vterm
This commit is contained in:
parent
8f64aa7059
commit
a967c94866
@ -54,7 +54,14 @@
|
||||
(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")))))
|
||||
(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)
|
||||
:custom
|
||||
(pyenv-show-active-python-in-modeline nil))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user