From 5e43944ef324ff3c04a6cff995cae86ae2878efd Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 27 Mar 2025 23:33:09 -0400 Subject: [PATCH] fix(evil): evil-collection: disable some submodules Exposes a user-configurable variable for disabling evil-collection modules, while also blacklisting modules that are incompatible with our modules (the case for evil-collection-lispy) or don't offer any/enough value to the user. Close: #8327 Amend: 2f7f37d49b94 --- modules/editor/evil/config.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index e5e704bc7..d1428d77d 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -188,6 +188,17 @@ directives. By default, this only recognizes C directives.") :unless noninteractive :unless (doom-context-p 'reload) :hook (doom-after-modules-config . evil-collection-init) + :preface + (defvar +evil-collection-disabled-list + '(anaconda-mode + company + elisp-mode + ert + lispy) + "A list of modules to ignore in `evil-collection-mode-list'. + +The defaults disable modules that we have our own keybinds for or that (IMO) +don't offer any/enough real value to users.") :init (defvar evil-collection-company-use-tng (modulep! :completion company +tng)) (defvar evil-collection-setup-minibuffer nil) @@ -198,6 +209,11 @@ directives. By default, this only recognizes C directives.") ;; derived from outline-mode). (defvar evil-collection-outline-enable-in-minor-mode-p nil) :config + (dolist (sym +evil-collection-disabled-list) + (if-let* ((elt (memq sym evil-collection-mode-list))) + (cl-callf2 delq sym evil-collection-mode-list) + (cl-callf2 delete (assq elt evil-collection-mode-list) evil-collection-mode-list))) + (setq evil-collection-key-blacklist (append (list doom-leader-key doom-localleader-key doom-leader-alt-key)