lang/python: remove +ipython flag
+ Replace +ipython functionality with +python/open-ipython-repl command. + Use python-shell-interpreter for eval handlers, repl and python version detection. + Removed various python-shell-* variables for ipython; they are already supported upstream.
This commit is contained in:
parent
7c6e2e705f
commit
9185da824c
2 changed files with 5 additions and 14 deletions
|
@ -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")))
|
||||
|
||||
|
|
|
@ -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)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue