Fork me on GitHub
#cider
<
2023-06-14
>
jpmonettas10:06:50

Hi! I'm trying to use the cider debugger with evil-mode but evil is capturing the debugger minor modes keys. I see there is evil-emacs-state-modes for modes you want evil to automatically go to normal emacs, but it doesn't seem to work for minor modes like the cider debugger. Any ideas?

tomd12:06:44

Otherwise you can bind the keys back to their original definitions by using evil-define-minor-mode-key with a list like what they have https://github.com/emacs-evil/evil-collection/blob/97a57c91d200a278d0bf91199e2eae45f7d875b0/modes/cider/evil-collection-cider.el#L101-L113

jpmonettas12:06:21

oh that is interesting

jpmonettas12:06:24

thanks a lot

👍 2
tomd15:06:05

One other approach:

(defun emacs-state-cider-debug ()
  (if cider--debug-mode
      (evil-emacs-state 1)
    (evil-force-normal-state)))

(add-hook 'cider--debug-mode-hook 'emacs-state-cider-debug)

jpmonettas15:06:30

thanks!!

👍 2