CIDER: Only use cider-find-var when cider-use-xref is nil

Closes: #776
This commit is contained in:
Cássio Ávila 2024-03-01 17:39:40 -03:00 committed by Youmu
parent 0da72667ce
commit 5bb5ada5e5
1 changed files with 11 additions and 5 deletions

View File

@ -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
@ -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