aboutsummaryrefslogtreecommitdiff
path: root/tw/home/files/emacs-init.el
diff options
context:
space:
mode:
authorTimo Wilken2024-01-24 14:13:52 +0100
committerTimo Wilken2024-01-24 14:14:20 +0100
commit5a50cb3d4fc6dff637fbb8e98b30acaca2c7fbaa (patch)
treebdbfef77d7756672b9b49c3682ba1e011038f11f /tw/home/files/emacs-init.el
parentc4c5dc182b7f5c18e67fa2284224e7e4f080ab51 (diff)
Fix Emacs linter setup for Python files
Diffstat (limited to 'tw/home/files/emacs-init.el')
-rw-r--r--tw/home/files/emacs-init.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el
index d3f6f66d..ef09782a 100644
--- a/tw/home/files/emacs-init.el
+++ b/tw/home/files/emacs-init.el
@@ -397,10 +397,11 @@ If CREATE is true and the resulting directory does not exist, create it."
:commands (python-mode python-ts-mode)
:mode (((rx ".py" (? (or ?\i ?\w)) eos) . python-ts-mode)
((rx ".aurora" eos) . python-ts-mode))
- :flymake-hook
- ;; Disable all flymake-collection checkers in Python modes, since eglot should take care of it.
- (python-ts-mode)
- (python-mode))
+ :config
+ ;; Disable all flymake-collection linters in Python modes, since eglot/pylsp
+ ;; should take care of it. It doesn't do type checking, so enable mypy.
+ (cl-dolist (mode '(python-ts-mode python-mode))
+ (add-to-list 'flymake-collection-config `(,mode flymake-mypy))))
(use-package rec-mode
:mode (rx ".rec" eos))