From 081fb8db2408d9c214f864e138010454c84a959c Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Mon, 27 Nov 2023 14:31:19 +0100 Subject: Disable flymake-collection Python checkers These seem to slow down large buffers a lot, and eglot already does linting. --- tw/home/files/emacs-init.el | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'tw/home/files') 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)) -- cgit v1.2.3