Activate pyvenv-mode in a hook

This commit is contained in:
Jeremy Dormitzer 2020-02-07 10:30:00 -05:00
parent 9d266b10f2
commit 58f9c4bea5

View File

@ -2390,9 +2390,9 @@ Alternatively, use the LSP python client:
Support pyvenv within Emacs:
#+BEGIN_SRC emacs-lisp
(use-package pyvenv
:commands (pyvenv-workon pyvenv-activate)
:config
(pyvenv-mode))
:commands (pyvenv-mode pyvenv-workon pyvenv-activate)
:init
(add-hook 'python-mode-hook #'pyvenv-mode))
(defun eshell/workon (name)
(pyvenv-workon name))