Skip to content

Commit

Permalink
CIDER: Only use cider-find-var when cider-use-xref is nil
Browse files Browse the repository at this point in the history
Closes: #776
  • Loading branch information
toniz4 authored and condy0919 committed Mar 5, 2024
1 parent 0da7266 commit 5bb5ada
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions modes/cider/evil-collection-cider.el
Original file line number Diff line number Diff line change
Expand Up @@ -121,23 +121,29 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
"q" 'evil-collection-cider-debug-quit))

(evil-collection-define-key '(normal visual) 'cider-mode-map
"gd" 'cider-find-var
(kbd "C-t") 'cider-pop-back
"gz" 'cider-switch-to-repl-buffer
"gf" 'cider-find-resource
"K" 'cider-doc)

(unless cider-use-xref
(evil-collection-define-key '(normal visual) 'cider-mode-map
"gd" 'cider-find-var
(kbd "C-t") 'cider-pop-back))

(evil-collection-define-key '(normal visual) 'cider-repl-mode-map
;; FIXME: This seems to get overwritten by `cider-switch-to-repl-buffer'.
"gz" 'cider-switch-to-last-clojure-buffer
(kbd "RET") 'cider-repl-return

"gd" 'cider-find-var
(kbd "C-t") 'cider-pop-back
"gr" 'cider-refresh
"gf" 'cider-find-resource
"K" 'cider-doc)

(unless cider-use-xref
(evil-collection-define-key '(normal visual) 'cider-repl-mode-map
"gd" 'cider-find-var
(kbd "C-t") 'cider-pop-back))

(evil-collection-define-key '(normal visual) 'cider-repl-history-mode-map
(kbd "C-k") 'cider-repl-history-previous
(kbd "C-j") 'cider-repl-history-forward
Expand Down Expand Up @@ -180,7 +186,7 @@ ex. \(cider-debug-mode-send-reply \":next\"\)"
"r" 'cider-macroexpand-again
"K" 'cider-doc ; Evil has `evil-lookup'.
"J" 'cider-javadoc
"." 'cider-find-var
"." (if cider-use-xref 'xref-find-definitions 'cider-find-var)
"m" 'cider-macroexpand-1-inplace
"a" 'cider-macroexpand-all-inplace
"u" 'cider-macroexpand-undo
Expand Down

0 comments on commit 5bb5ada

Please sign in to comment.