Automatically restart python interpreters when switching virtualenvs

This apparantely does not work when simply deactivating the current virtual
environment, though.
This commit is contained in:
Daniel - 2021-04-24 09:42:33 +02:00
parent 32cb502915
commit 36a1693610
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 6 additions and 1 deletions

View File

@ -3005,7 +3005,12 @@ With given ARG, display files in `db/important-document-path."
(use-package pyvenv
:ensure t
:commands (pyvenv-workon pyvenv-activate)
:init (setenv "WORKON_HOME" (expand-file-name "~/.pyenv/versions")))
:init (setenv "WORKON_HOME" (expand-file-name "~/.pyenv/versions"))
:config (progn
;; Restart python inferior processes when switching virtual
;; environments; this does not work when only calling
;; `pyvenv-deactivate', though.
(add-hook 'pyvenv-post-activate-hooks #'pyvenv-restart-python)))
(use-package shr
:init (setq shr-use-fonts nil