emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
nmkip 2021-02-07T01:19:11.039Z

Hi! Is there a way I can override some evil keys for a specific mode (cider-inspect-mode)?

nmkip 2021-02-07T13:24:41.039600Z

Thanks!! I'll try to figure out what that does and come back later

nmkip 2021-02-07T14:27:28.039800Z

This worked for me:

(defun nmkip/cider-inspector-mode-hook ()
    (general-override-local-mode)
    (general-define-key
     :states 'normal
     :keymaps 'local
     "h" 'cider-inspector-pop
     "H" 'cider-inspector-prev-page
     "j" 'cider-inspector-next-inspectable-object
     "k" 'cider-inspector-previous-inspectable-object
     "l" 'cider-inspector-operate-on-point
     "L" 'cider-inspector-next-page
     "q" 'quit-window
     "r" 'cider-inspector-refresh
     "s" 'cider-inspector-set-page-size
     (kbd "RET") 'cider-inspector-operate-on-point
     [mouse-1] 'cider-inspector-operate-on-click
     ))

fedreg 2021-02-08T03:23:02.040Z

Glad you got it working! Sorry, realized I didn’t give you any explanation of the snippets I posted above 😁

😄 1
fedreg 2021-02-07T01:58:03.039200Z

I do this to override evil keys for the cider debugger. I imagine you should be able to do something similar for inspect-mode?

(defun my-cider-debug-setup ()
  (evil-make-overriding-map cider--debug-mode-map 'normal)
  (evil-normalize-keymaps))

(add-hook 'cider--debug-mode-hook 'my-cider-debug-setup)