mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/python: make repl/eval handlers respect pipenv
This commit is contained in:
@ -7,7 +7,13 @@
|
||||
(defun +python/repl ()
|
||||
"Open the Python REPL."
|
||||
(interactive)
|
||||
(process-buffer (run-python nil t t)))
|
||||
(process-buffer
|
||||
(if-let* ((bin (executable-find "pipenv"))
|
||||
(dir (pipenv-project-p)))
|
||||
(let* ((default-directory dir)
|
||||
(python-shell-interpreter (format "%s run %s" bin python-shell-interpreter)))
|
||||
(run-python nil t t))
|
||||
(run-python nil t t))))
|
||||
|
||||
(defun +python--extract-version (prefix str)
|
||||
(when str
|
||||
|
Reference in New Issue
Block a user