diff options
Diffstat (limited to 'Emacs.org')
-rw-r--r-- | Emacs.org | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) |