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 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:
|
||||
- flake8
|
||||
- pylint
|
||||
Note that all my checkers/formatters/interactive shells are managed through =conda= rather than installed system-wide (not to be confused with =anaconda= above).
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(defun nd/init-anaconda-company ()
|
||||
"Set the company backends for anaconda mode."
|
||||
(setq-local company-backends '(company-anaconda)))
|
||||
|
||||
(nd/require-bin "ipython")
|
||||
(nd/require-bin "flake8")
|
||||
(nd/require-bin "python-pylint")
|
||||
|
||||
(use-package python
|
||||
:after flycheck
|
||||
: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))
|
||||
:config
|
||||
(progn
|
||||
(nd/when-bin "ipython"
|
||||
(nd/when-bin "conda"
|
||||
(setq indent-tabs-mode nil
|
||||
python-shell-interpreter "ipython"
|
||||
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))))
|
||||
|
||||
(use-package anaconda-mode
|
||||
|
@ -1002,9 +996,7 @@ Anaconda is much lighter and easier than elpy. Also use ipython instead of the b
|
|||
**** formatting
|
||||
[[https://github.com/python/black][Black]] is a really nice syntax formatter. It must be externally installed to work.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(nd/require-bin "black" :pacman "python-black")
|
||||
|
||||
(nd/when-bin "black"
|
||||
(nd/when-bin "conda"
|
||||
(use-package blacken
|
||||
:straight t))
|
||||
#+END_SRC
|
||||
|
|
Loading…
Reference in New Issue