parent
8428433898
commit
4c3f5e8cc2
1 changed files with 13 additions and 7 deletions
|
@ -33,13 +33,19 @@ Tries xref and falls back to `dumb-jump', then rg/ag, then
|
||||||
(xref-find-definitions identifier))
|
(xref-find-definitions identifier))
|
||||||
t))
|
t))
|
||||||
|
|
||||||
((and (fboundp 'dumb-jump-go)
|
((and (require 'dumb-jump nil t)
|
||||||
;; dumb-jump doesn't tell us if it succeeded or not
|
;; dumb-jump doesn't tell us if it succeeded or not
|
||||||
(let (successful)
|
(let ((old-fn-sym (make-symbol "old-fn"))
|
||||||
(flet ((old-dumb-jump-result-follow (result &optional use-tooltip proj) (dumb-jump-result-follow result use-tooltip proj))
|
successful)
|
||||||
(dumb-jump-result-follow (result &optional use-tooltip proj)
|
(cl-letf ((old-fn-sym (symbol-function 'dumb-jump-get-results))
|
||||||
(setq successful t)
|
((symbol-function 'dumb-jump-get-results)
|
||||||
(old-dumb-jump-result-follow result use-tooltip proj)))
|
(lambda (&optional prompt)
|
||||||
|
(message "-- %s" old-fn-sym)
|
||||||
|
(let* ((plist (funcall old-fn-sym prompt))
|
||||||
|
(results (plist-get plist :results)))
|
||||||
|
(when (and results (> (length results) 0))
|
||||||
|
(setq successful t))
|
||||||
|
plist))))
|
||||||
(if other-window
|
(if other-window
|
||||||
(dumb-jump-go-other-window)
|
(dumb-jump-go-other-window)
|
||||||
(dumb-jump-go))
|
(dumb-jump-go))
|
||||||
|
@ -55,7 +61,7 @@ Tries xref and falls back to `dumb-jump', then rg/ag, then
|
||||||
|
|
||||||
((and (featurep 'evil)
|
((and (featurep 'evil)
|
||||||
evil-mode
|
evil-mode
|
||||||
(cl-destructuring-bind (beg end)
|
(cl-destructuring-bind (beg . end)
|
||||||
(bounds-of-thing-at-point 'symbol)
|
(bounds-of-thing-at-point 'symbol)
|
||||||
(evil-goto-definition)
|
(evil-goto-definition)
|
||||||
(let ((pt (point)))
|
(let ((pt (point)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue