From 8740f0f4e6651eebb06c56a37c90e0fbc087070c Mon Sep 17 00:00:00 2001 From: justbur Date: Thu, 29 Oct 2015 20:51:09 -0400 Subject: [PATCH] Add option to show popup for evil operators Default is to enable if evil is loaded before which-key. Otherwise, it is disabled. --- which-key.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/which-key.el b/which-key.el index 74cd627f4a1..ddced1974f8 100644 --- a/which-key.el +++ b/which-key.el @@ -247,6 +247,13 @@ prefixes in `which-key-paging-prefixes'" :group 'which-key :type 'boolean) +(defcustom which-key-allow-evil-operators (boundp 'evil-this-operator) + "Allow popup to show for evil operators. The popup is normally + inhibited in the middle of commands, but setting this to + non-nil will override this behavior for evil operators." + :group 'which-key + :type 'boolean) + ;; Faces (defgroup which-key-faces nil "Faces for which-key-mode" @@ -1546,7 +1553,8 @@ Finally, show the buffer." (not which-key-inhibit) ;; Do not display the popup if a command is currently being ;; executed - (null this-command)) + (or (and which-key-allow-evil-operators evil-this-operator) + (null this-command))) (which-key--create-buffer-and-show prefix-keys)))) ;; Timers