diff options
Diffstat (limited to 'tw')
-rw-r--r-- | tw/home/files/emacs-init.el | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el index 648875cd..2e4ff9f9 100644 --- a/tw/home/files/emacs-init.el +++ b/tw/home/files/emacs-init.el @@ -192,22 +192,27 @@ (use-package flymake :after (evil which-key) + :demand t ; needed for `flymake-collection' :hook prog-mode :init (which-key-add-key-based-replacements "<leader>e" '("errors" . "Flymake")) :bind (("<leader>eb" . flymake-start) - ("<leader>el" . flymake-show-buffer-diagnostics) - ("<leader>ep" . flymake-show-project-diagnostics) - ("<leader>e." . display-local-help) ; Show the error message at point in the minibuffer. + ("<leader>ec" . display-local-help) ; Show the error message at point in the minibuffer. ; `flymake' also shows it using `eldoc', but documentation ; seems to override error messages. + ; `flymake-show-diagnostic' only says "Nothing at point". + ("<leader>el" . flymake-show-buffer-diagnostics) + ("<leader>ep" . flymake-show-project-diagnostics) ("<leader>en" . flymake-goto-next-error) - ("<leader>eN" . flymake-goto-prev-error)) + ("<leader>eN" . flymake-goto-prev-error) + ("<leader>ev" . flymake-running-backends) + ("<leader>eV" . flymake-disabled-backends)) :custom (flymake-suppress-zero-counters nil "Show severity counters even when they are zero.")) (use-package flymake-collection :after (flymake) + :demand t ; we need it loaded now ;; This needs to be called in `after-init-hook' so that all other ;; packages' `:flymake-hook's are processed before f-c-hook-setup is ;; called. See https://github.com/mohkale/flymake-collection. @@ -251,9 +256,19 @@ :mode (rx ".pp" eos)) (use-package python + :after (flymake-collection) :commands (python-mode) :mode (((rx ".py" (? (or ?\i ?\w)) eos) . python-mode) - ((rx ".aurora" eos) . python-mode))) + ((rx ".aurora" eos) . python-mode)) + ;; :flymake-hook would be better, but it fails with error: (void-variable + ;; for). Somehow `cl-loop' is getting parsed wrong... + ;; https://github.com/mohkale/flymake-collection#associating-checkers-with-major-modes + :init (add-to-list 'flymake-collection-config + '(python-mode + flymake-collection-flake8 + flymake-collection-mypy + (flymake-collection-pycodestyle :disabled t) + flymake-collection-pylint))) (use-package rec-mode :mode (rx ".rec" eos)) |