Open alephnull opened 4 years ago
That won't work unless you reset the timer each time you enter and exit the buffer.
You could try something like this instead
(add-hook 'which-key-delay-functions
(lambda (_ _)
(when (eq major-mode 'markdown-mode)
1000))
nil t)
@alephnull you can set markdown-enable-prefix-prompts
to nil
instead :)
The which-key-delay-functions trick works well and is very helpful for me in vterm. Add this to the docs maybe?
Seconded on the delay functions trick as a solution in vterm, though I feel a list of disabled modes would be a cleaner solution.
Here's my take on a 2s added delay to make evil and leader keybindings work in vterm with doom emacs without which-key interfering with the cursor placement.
(after! which-key
(defun t/delayed-which-key (_ _)
(cond
((eq major-mode 'vterm-mode) 2)
(t nil)))
(add-hook! 'which-key-delay-functions #'t/delayed-which-key))
Like markdown-mode already has excellent prompt support when you are editing and which-key takes it over. I tried setting up a local variable in markdown-mode-hook like:
and I can see that the variable is set in buffer but w-k seems to be using the default value. ANy other way of disabling also welcome.