diff --git a/modules/lang/python/autoload/python.el b/modules/lang/python/autoload/python.el index 73072dc83..c972da568 100644 --- a/modules/lang/python/autoload/python.el +++ b/modules/lang/python/autoload/python.el @@ -60,7 +60,9 @@ started it." (+python--extract-version "Pipenv " v) +python-version-cache)) (puthash (or (doom-project-root) default-directory) - (+python--extract-version "Python " (car (process-lines "python" "--version"))) + (+python--extract-version + "Python " + (car (process-lines python-shell-intepreter "--version"))) +python-version-cache)) (error "Python"))) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index f23c48975..14ee8fc82 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -14,18 +14,7 @@ :defer t :init (setq python-environment-directory doom-cache-dir - python-indent-guess-indent-offset-verbose nil - python-shell-interpreter "python") - (when (featurep! +ipython) - (setq python-shell-interpreter "ipython" - python-shell-interpreter-args "-i --simple-prompt --no-color-info" - python-shell-prompt-regexp "In \\[[0-9]+\\]: " - python-shell-prompt-block-regexp "\\.\\.\\.\\.: " - python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: " - python-shell-completion-setup-code - "from IPython.core.completerlib import module_completion" - python-shell-completion-string-code - "';'.join(get_ipython().Completer.all_completions('''%s'''))\n")) + python-indent-guess-indent-offset-verbose nil) :config (set-env! "PYTHONPATH" "PYENV_ROOT" "ANACONDA_HOME") (set-electric! 'python-mode :chars '(?:)) @@ -131,7 +120,7 @@ :init (setq pipenv-with-projectile nil) :config (set-eval-handler! 'python-mode - '((:command . "python") + '((:command . (lambda () python-shell-interpreter)) (:exec (lambda () (if-let* ((bin (executable-find "pipenv")) (_ (pipenv-project-p)))