summaryrefslogtreecommitdiffstats
path: root/Emacs.org
diff options
context:
space:
mode:
authorjdlugosz963 <jdlugosz963@gmail.com>2022-08-12 23:41:53 +0200
committerjdlugosz963 <jdlugosz963@gmail.com>2022-08-12 23:41:53 +0200
commit4a00508f8a09c6fb3b284627b65624a2f9a46916 (patch)
treec576560793759bd8f3f1fb75885142d40376d884 /Emacs.org
parentaf0b9428baeb74bea8e24383f3e8b7169108b40d (diff)
downloaddotfiles-4a00508f8a09c6fb3b284627b65624a2f9a46916.tar.gz
dotfiles-4a00508f8a09c6fb3b284627b65624a2f9a46916.zip
Add auto activate python virtual env
Diffstat (limited to 'Emacs.org')
-rw-r--r--Emacs.org9
1 files changed, 8 insertions, 1 deletions
diff --git a/Emacs.org b/Emacs.org
index af614a4..8605870 100644
--- a/Emacs.org
+++ b/Emacs.org
@@ -446,8 +446,15 @@
446 446
447#+begin_src emacs-lisp 447#+begin_src emacs-lisp
448 448
449 (defun jd/python-mode-setup ()
450 (let ((project-venv-path (concat (projectile-project-root) "venv/")))
451 (when (projectile--directory-p project-venv-path)
452 (pyvenv-activate project-venv-path)
453 (pyvenv-mode))))
454
449 (use-package python-mode 455 (use-package python-mode
450 :hook (python-mode . lsp-deferred)) 456 :hook (python-mode . lsp-deferred)
457 :hook (python-mode . jd/python-mode-setup))
451 458
452 (use-package pyvenv 459 (use-package pyvenv
453 :after python-mode) 460 :after python-mode)