ENH don't depend on system files for python dev
This commit is contained in:
parent
a7bfefd99b
commit
39a5b01707
16
etc/conf.org
16
etc/conf.org
|
@ -959,18 +959,12 @@ I don't really use elpy, but it has really nice inferior process commands, so im
|
||||||
**** anaconda, ipython, and flycheck
|
**** anaconda, ipython, and flycheck
|
||||||
Anaconda is much lighter and easier than elpy. Also use ipython instead of the built-in shell. (Note this requires ipython to be installed externally).
|
Anaconda is much lighter and easier than elpy. Also use ipython instead of the built-in shell. (Note this requires ipython to be installed externally).
|
||||||
|
|
||||||
=Flycheck= has built in support for syntax checking and can be additionally enhanced by installing the following:
|
Note that all my checkers/formatters/interactive shells are managed through =conda= rather than installed system-wide (not to be confused with =anaconda= above).
|
||||||
- flake8
|
|
||||||
- pylint
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun nd/init-anaconda-company ()
|
(defun nd/init-anaconda-company ()
|
||||||
"Set the company backends for anaconda mode."
|
"Set the company backends for anaconda mode."
|
||||||
(setq-local company-backends '(company-anaconda)))
|
(setq-local company-backends '(company-anaconda)))
|
||||||
|
|
||||||
(nd/require-bin "ipython")
|
|
||||||
(nd/require-bin "flake8")
|
|
||||||
(nd/require-bin "python-pylint")
|
|
||||||
|
|
||||||
(use-package python
|
(use-package python
|
||||||
:after flycheck
|
:after flycheck
|
||||||
:hook ((python-mode . flycheck-mode)
|
:hook ((python-mode . flycheck-mode)
|
||||||
|
@ -984,11 +978,11 @@ Anaconda is much lighter and easier than elpy. Also use ipython instead of the b
|
||||||
(inferior-python-mode . nd/init-anaconda-company))
|
(inferior-python-mode . nd/init-anaconda-company))
|
||||||
:config
|
:config
|
||||||
(progn
|
(progn
|
||||||
(nd/when-bin "ipython"
|
(nd/when-bin "conda"
|
||||||
(setq indent-tabs-mode nil
|
(setq indent-tabs-mode nil
|
||||||
python-shell-interpreter "ipython"
|
python-shell-interpreter "ipython"
|
||||||
python-shell-interpreter-args "-i --simple-prompt --quiet --no-banner"))
|
python-shell-interpreter-args "-i --simple-prompt --quiet --no-banner"))
|
||||||
(nd/when-bin "flake8"
|
(nd/when-bin "conda"
|
||||||
(flycheck-add-next-checker 'python-flake8 'python-pylint))))
|
(flycheck-add-next-checker 'python-flake8 'python-pylint))))
|
||||||
|
|
||||||
(use-package anaconda-mode
|
(use-package anaconda-mode
|
||||||
|
@ -1002,9 +996,7 @@ Anaconda is much lighter and easier than elpy. Also use ipython instead of the b
|
||||||
**** formatting
|
**** formatting
|
||||||
[[https://github.com/python/black][Black]] is a really nice syntax formatter. It must be externally installed to work.
|
[[https://github.com/python/black][Black]] is a really nice syntax formatter. It must be externally installed to work.
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(nd/require-bin "black" :pacman "python-black")
|
(nd/when-bin "conda"
|
||||||
|
|
||||||
(nd/when-bin "black"
|
|
||||||
(use-package blacken
|
(use-package blacken
|
||||||
:straight t))
|
:straight t))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
Loading…
Reference in New Issue