From 390594442a6d2ee8ad755b8412e4a702fe10047c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 16 Oct 2020 22:28:37 -0400 Subject: [PATCH] Reset which-key replacements on doom/reload Prevents build-up of which-key entries. See justbur/emacs-which-key#226 --- core/core-keybinds.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 9e06e2df9..203a4060e 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -191,6 +191,10 @@ localleader prefix." which-key-min-display-lines 6 which-key-side-window-slot -10) :config + (defvar doom--initial-which-key-replacement-alist which-key-replacement-alist) + (add-hook! 'doom-before-reload-hook + (defun doom-reset-which-key-replacements-h () + (setq which-key-replacement-alist doom--initial-which-key-replacement-alist))) ;; general improvements to which-key readability (set-face-attribute 'which-key-local-map-description-face nil :weight 'bold) (which-key-setup-side-window-bottom)