From 9b9fd3c87f9cab33f599c2d040bbc2d922f8fe22 Mon Sep 17 00:00:00 2001 From: Raphael Roberts Date: Mon, 14 Oct 2019 22:20:50 -0500 Subject: [PATCH] Revamped python config and removed redundant blacken-mode --- custom.el | 1 - settings.org | 18 +++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/custom.el b/custom.el index e30dc40..9873d21 100644 --- a/custom.el +++ b/custom.el @@ -82,7 +82,6 @@ mode-line-bell htmlize cython-mode - blacken dired-narrow lua-mode browse-kill-ring diff --git a/settings.org b/settings.org index 4a00a4f..e21fee6 100644 --- a/settings.org +++ b/settings.org @@ -434,14 +434,22 @@ put executables in elpy-rpc-venv in path *** bindings/settings #+BEGIN_SRC emacs-lisp (use-package python - :hook ((python-mode . blacken-mode) - (python-mode . pyvenv-mode) - (hack-local-variables . rlbr/init-venv)) + :hook + ((python-mode . pyvenv-mode) + (python-mode . flycheck-mode) + (python-mode . (lambda () (add-hook 'before-save-hook 'elpy-black-fix-code nil 'local)))) + :bind + (:map python-mode-map + (("C-<" . flycheck-previous-error) + ("C->" . flycheck-next-error))) :config (use-package elpy + :hook (hack-local-variables . rlbr/init-venv) :bind (("C-=" . elpy-goto-assignment)) - :config (when (require 'flycheck nil t) - (setq elpy-modules (delq 'elpy-module-flymake elpy-modules)))) + :config + (when (require 'flycheck nil t) + (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))) + (rlbr/elpy-append-to-path)) (elpy-enable)) #+END_SRC ** SSH config mode