Merge pull request #2180 from rakanalh/python-isort
lang/python: add py-isort, remove pyimpsort
This commit is contained in:
commit
98e2fecf43
4 changed files with 16 additions and 4 deletions
|
@ -31,7 +31,7 @@ Adds Python support to Doom Emacs.
|
||||||
** Plugins
|
** Plugins
|
||||||
+ [[https://github.com/pythonic-emacs/anaconda-mode][anaconda-mode]]*
|
+ [[https://github.com/pythonic-emacs/anaconda-mode][anaconda-mode]]*
|
||||||
+ [[https://github.com/Wilfred/pyimport][pyimport]]*
|
+ [[https://github.com/Wilfred/pyimport][pyimport]]*
|
||||||
+ [[https://github.com/emacs-pe/pyimpsort.el][pyimpsort]]*
|
+ [[https://github.com/paetzke/py-isort.el][py-isort]]*
|
||||||
+ [[https://melpa.org/#/nose][nose]]*
|
+ [[https://melpa.org/#/nose][nose]]*
|
||||||
+ [[https://github.com/wbolster/emacs-python-pytest][python-pytest]]*
|
+ [[https://github.com/wbolster/emacs-python-pytest][python-pytest]]*
|
||||||
+ [[https://github.com/Wilfred/pip-requirements.el][pip-requirements]]*
|
+ [[https://github.com/Wilfred/pip-requirements.el][pip-requirements]]*
|
||||||
|
@ -67,6 +67,9 @@ This module has no direct prerequisites. Here are some of its soft dependencies.
|
||||||
+ ~pyimport~ requires Python's module ~pyflakes~:
|
+ ~pyimport~ requires Python's module ~pyflakes~:
|
||||||
+ ~pip install pyflakes~
|
+ ~pip install pyflakes~
|
||||||
|
|
||||||
|
+ ~py-isort~ requires [[https://github.com/timothycrosley/isort][isort]] to be installed:
|
||||||
|
+ ~pip install isort~
|
||||||
|
|
||||||
+ Python virtual environments install instructions at:
|
+ Python virtual environments install instructions at:
|
||||||
+ [[https://github.com/pyenv/pyenv][pyenv]]
|
+ [[https://github.com/pyenv/pyenv][pyenv]]
|
||||||
+ [[https://conda.io/en/latest/][Conda]]
|
+ [[https://conda.io/en/latest/][Conda]]
|
||||||
|
|
|
@ -59,4 +59,4 @@
|
||||||
"organize imports"
|
"organize imports"
|
||||||
(interactive)
|
(interactive)
|
||||||
(pyimport-remove-unused)
|
(pyimport-remove-unused)
|
||||||
(pyimpsort-buffer))
|
(py-isort-buffer))
|
||||||
|
|
|
@ -139,10 +139,19 @@ called.")
|
||||||
(:prefix ("i" . "imports")
|
(:prefix ("i" . "imports")
|
||||||
:desc "Insert missing imports" "i" #'pyimport-insert-missing
|
:desc "Insert missing imports" "i" #'pyimport-insert-missing
|
||||||
:desc "Remove unused imports" "r" #'pyimport-remove-unused
|
:desc "Remove unused imports" "r" #'pyimport-remove-unused
|
||||||
:desc "Sort imports" "s" #'pyimpsort-buffer
|
|
||||||
:desc "Optimize imports" "o" #'+python/optimize-imports)))
|
:desc "Optimize imports" "o" #'+python/optimize-imports)))
|
||||||
|
|
||||||
|
|
||||||
|
(use-package! py-isort
|
||||||
|
:defer t
|
||||||
|
:init
|
||||||
|
(map! :after python
|
||||||
|
:map python-mode-map
|
||||||
|
:localleader
|
||||||
|
(:prefix ("i" . "imports")
|
||||||
|
:desc "Sort imports" "s" #'py-isort-buffer
|
||||||
|
:desc "Sort region" "r" #'py-isort-region)))
|
||||||
|
|
||||||
(use-package! nose
|
(use-package! nose
|
||||||
:commands nose-mode
|
:commands nose-mode
|
||||||
:preface (defvar nose-mode-map (make-sparse-keymap))
|
:preface (defvar nose-mode-map (make-sparse-keymap))
|
||||||
|
|
|
@ -31,4 +31,4 @@
|
||||||
|
|
||||||
;; Import managements
|
;; Import managements
|
||||||
(package! pyimport)
|
(package! pyimport)
|
||||||
(package! pyimpsort)
|
(package! py-isort)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue