From b48f918bdd5e046c5c300de21fe94b2ea020571a Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Tue, 15 Nov 2016 22:05:58 +0100 Subject: [PATCH] Update auto-virtualenv config It now activates automatically when switching to `python-mode` --- init.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index d5ae372..282eaab 100644 --- a/init.el +++ b/init.el @@ -815,7 +815,11 @@ (global-anzu-mode 1)) (use-package auto-virtualenv - :ensure t) + :ensure t + :config + (add-hook 'python-mode-hook 'auto-virtualenv-set-virtualenv) + (add-hook 'projectile-after-switch-project-hook + 'auto-virtualenv-set-virtualenv)) (use-package flymake-python-pyflakes :ensure t)