Add auto-virtualenv to automatically activate python venv

This commit is contained in:
RealStickman 2023-06-21 20:45:54 +02:00
parent 54653dbe02
commit 7f82df2149
3 changed files with 12 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/music-normalize/venv/ /music-normalize/venv/
/music-normalize/*.log /music-normalize/*.log
/easyffmpeg/venv/ /easyffmpeg/venv/
/venv/

View File

@ -91,3 +91,11 @@
;; Disable formatter for php ;; Disable formatter for php
(setq-hook! 'php-mode-hook +format-with :none) (setq-hook! 'php-mode-hook +format-with :none)
; auto-virtualenv package configuration
(use-package! auto-virtualenv
:init
:config
(add-hook! 'python-mode-hook 'auto-virtualenv-set-virtualenv)
(add-hook! 'projectile-after-switch-project-hook 'auto-virtualenv-set-virtualenv) ;; If using projectile
)

View File

@ -48,3 +48,6 @@
;(unpin! pinned-package another-pinned-package) ;(unpin! pinned-package another-pinned-package)
;; ...Or *all* packages (NOT RECOMMENDED; will likely break things) ;; ...Or *all* packages (NOT RECOMMENDED; will likely break things)
;(unpin! t) ;(unpin! t)
;; auto-virtualenv package install
(package! auto-virtualenv)