From 87dc8b8cac47d9d759db44799ffa0485334b74b0 Mon Sep 17 00:00:00 2001 From: Jeremy Dormitzer Date: Wed, 24 Feb 2021 16:52:01 -0500 Subject: [PATCH] Add py-isort --- emacs/.emacs.d/config/init-python.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/emacs/.emacs.d/config/init-python.el b/emacs/.emacs.d/config/init-python.el index 4fac2ec..e094ede 100644 --- a/emacs/.emacs.d/config/init-python.el +++ b/emacs/.emacs.d/config/init-python.el @@ -53,4 +53,12 @@ :general (python-mode-map "C-c C-d" #'lsp-describe-thing-at-point)) +;; isort to sort Python imports +(use-package py-isort + :commands (py-isort-buffer py-isort-region) + :config + (setq py-isort-options '("-m=3")) + :general + (python-mode-map "C-c C-i" #'py-isort-buffer)) + (provide 'init-python)