Cider offers very useful debugger for clojure code. Once you enter the debugger, you can step through it with keys like (n)ext, (o)ut, etc., like so. Using evil, the problem is that if I enter this debugger in normal-state, those keypresses will never make it to cider-debug, as evil interprets them according to its own keymap.
One way to reconcile this would be to automatically enter insert state when cider-interactive-eval
(how you enter the debugger) is called and cider--debug-mode
is active.
Here's how I imagine it would be, but it doesn't work yet. How can I improve this?
(defadvice cider-interactive-eval (after enter-insert-for-dbg activate)
"When cider-eval takes you to a dbg session, enter insert-state."
(when (and (bound-and-true-p cider--debug-mode)
(eq evil-state 'normal))
(evil-insert 1)))
(ad-activate 'cider-interactive-eval)
emacs-state
(orinsert-state
)?(add-to-list 'evil-emacs-state-modes 'cider--debug-mode)
.