Set python-shell-* vars early
To make it easier for users to overwrite them in thir config.el (without an after! block).
This commit is contained in:
parent
b573fcce20
commit
7f1b526f64
1 changed files with 10 additions and 11 deletions
|
@ -16,6 +16,16 @@
|
|||
(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"))
|
||||
:config
|
||||
(set-env! "PYTHONPATH" "PYENV_ROOT" "ANACONDA_HOME")
|
||||
(set-electric! 'python-mode :chars '(?:))
|
||||
|
@ -45,17 +55,6 @@
|
|||
sp-point-after-word-p
|
||||
sp-point-before-same-p)))
|
||||
|
||||
(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"))
|
||||
|
||||
(setq-hook! 'python-mode-hook tab-width python-indent-offset)
|
||||
|
||||
;; Add python/pipenv version string to the major mode in the modeline
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue