Pick up local variables before starting the Python IDE
This commit is contained in:
parent
02786dac5c
commit
b2f67e84ee
1 changed files with 5 additions and 4 deletions
|
|
@ -243,16 +243,17 @@
|
|||
(defun load-python-env ()
|
||||
"Set up the Python IDE in the current project."
|
||||
(interactive)
|
||||
(progn
|
||||
(ignore-errors (poetry-venv-workon))
|
||||
(eglot-ensure)))
|
||||
(when (derived-mode-p 'python-mode)
|
||||
(progn
|
||||
(poetry-venv-workon)
|
||||
(eglot-ensure))))
|
||||
|
||||
(use-package python
|
||||
:bind (:map python-mode-map
|
||||
("C-c C-p" . nil)
|
||||
("C-c C-l" . nil)
|
||||
("C-c t" . elpy-test))
|
||||
:hook (python-mode . load-python-env)
|
||||
:hook (hack-local-variables . load-python-env)
|
||||
:config
|
||||
(load "python-tests.el")
|
||||
:custom
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue