summaryrefslogtreecommitdiff
path: root/tw/home/files/emacs-init.el
diff options
context:
space:
mode:
authorTimo Wilken2023-11-27 14:31:19 +0100
committerTimo Wilken2023-11-27 14:31:19 +0100
commit081fb8db2408d9c214f864e138010454c84a959c (patch)
treec222cd9d445a32a00639e8c90ff7a9a9aee32c70 /tw/home/files/emacs-init.el
parentd5d5e3b8ce00f1f559905f9c689866f778388e84 (diff)
Disable flymake-collection Python checkers
These seem to slow down large buffers a lot, and eglot already does linting.
Diffstat (limited to 'tw/home/files/emacs-init.el')
-rw-r--r--tw/home/files/emacs-init.el20
1 files changed, 6 insertions, 14 deletions
diff --git a/tw/home/files/emacs-init.el b/tw/home/files/emacs-init.el
index 001422e4..72c75799 100644
--- a/tw/home/files/emacs-init.el
+++ b/tw/home/files/emacs-init.el
@@ -320,14 +320,13 @@ If CREATE is true and the resulting directory does not exist, create it."
(use-package eglot
;; I have clang (for clangd) and python-lsp-server installed.
;; `:hook' adds `-mode' to the package name, but `eglot-mode' doesn't exist.
- :hook ((python-mode python-ts-mode c-mode c++-mode c-or-c++-ts-mode) . eglot-ensure)
+ :hook (((python-mode python-ts-mode c-mode c++-mode c-or-c++-ts-mode) . eglot-ensure)
+ (eglot-managed-mode . tw/help-is-eldoc))
:commands (eglot)
:functions (eglot-managed-p)
:custom
(eglot-autoshutdown t "Shut down language servers after deleting their last associated buffer.")
- (eglot-sync-connect 0.1 "Wait for the language server in the background if it takes longer than 100ms.")
- :config
- (add-hook 'eglot-managed-mode-hook #'tw/help-is-eldoc))
+ (eglot-sync-connect 0.1 "Wait for the language server in the background if it takes longer than 100ms."))
;; Tree-sitter
;; TODO: Try any/all of the following new tree-sitter-based major modes.
@@ -394,16 +393,9 @@ If CREATE is true and the resulting directory does not exist, create it."
:mode (((rx ".py" (? (or ?\i ?\w)) eos) . python-ts-mode)
((rx ".aurora" eos) . python-ts-mode))
:flymake-hook
- (python-ts-mode
- flymake-collection-flake8
- flymake-collection-mypy
- (flymake-collection-pycodestyle :disabled t)
- flymake-collection-pylint)
- (python-mode
- flymake-collection-flake8
- flymake-collection-mypy
- (flymake-collection-pycodestyle :disabled t)
- flymake-collection-pylint))
+ ;; Disable all flymake-collection checkers in Python modes, since eglot should take care of it.
+ (python-ts-mode)
+ (python-mode))
(use-package rec-mode
:mode (rx ".rec" eos))