In normal mode I can't jump to definition with ternjs or cider modes. I have to go to insert then hit M-.
Is that the evil way? Should I have M-. bound to another function that checks what mode you are in and does the proper thing accordingly?
Just found out you can use set-key-for-mode. Seems to be just what I wanted.
(evil-leader/set-key-for-mode 'clojure-mode "." 'cider-find-dwim
"," 'cider-pop-back
"<SPC>j" 'cider-jack-in
"<SPC>t" 'cider-test-run-test
"er" 'cider-eval-region
"ee" 'cider-eval-last-sexp
"ex" 'cider-eval-last-sexp-and-replace
"eb" 'cider-eval-buffer
"<SPC>d" 'cider-doc)
M-.
andM-,
in normal state, so they'll take precedence when doing key lookup. Insert state does not define them, so that's why key lookup finds the commands you're after. The easy solution for this is unbinding the commands in normal state.