Skip to content

Commit

Permalink
Emacs: isort Python imports on save
Browse files Browse the repository at this point in the history
  • Loading branch information
Indy2222 committed May 7, 2018
1 parent bcfe0e9 commit e6f8eb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Python
```bash
sudo apt-get install python-pip
# these makes Emacs Elpy more powerful
sudo pip install rope importmagic yapf flake8
sudo pip install rope importmagic yapf flake8 isort
```

Tmux
Expand Down
7 changes: 6 additions & 1 deletion emacs/init.el
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,12 @@
:ensure t
:demand t
:config
(add-hook 'python-mode-hook (lambda () (sphinx-doc-mode t)))))
(add-hook 'python-mode-hook (lambda () (sphinx-doc-mode t))))
(use-package py-isort
:ensure t
:demand t
:config
(add-hook 'before-save-hook 'py-isort-before-save)))

(use-package rust-mode
:ensure t
Expand Down

0 comments on commit e6f8eb6

Please sign in to comment.