       (call-interactively handler)
     (funcall handler identifier)))
 
-(defun +lookup--run-handlers (handler identifier origin &optional other-window)
+(defun +lookup--run-handlers (handler identifier origin)
   (doom-log "Looking up '%s' with '%s'" identifier handler)
   (condition-case e
-      (let ((plist (get handler '+lookup-plist)))
-        (cond ((plist-get plist :async)
-               (when other-window
-                 ;; If async, we can't catch the window change or destination
-                 ;; buffer reliably, so we set up the new window ahead of time.
-                 (switch-to-buffer-other-window (current-buffer))
-                 (goto-char (marker-position origin)))
-               (+lookup--run-handler handler identifier)
-               t)
-              ((save-window-excursion
-                 (and (or (+lookup--run-handler handler identifier)
-                          (null origin)
-                          (/= (point-marker) origin))
-                      (point-marker))))))
+      (let ((wconf (current-window-configuration))
+            (result (condition-case e
+                        (+lookup--run-handler handler identifier)
+                      (error
+                       (message "Lookup handler %S threw an error: %s" handler e)
+                       'fail))))
+        (cond ((eq result 'fail)
+               (set-window-configuration wconf)
+               nil)
+              ((or (get handler '+lookup-async)
+                   (eq result 'deferred)))
+              ((or result
+                   (null origin)
+                   (/= (point-marker) origin))
+               (prog1 (point-marker)
+                 (set-window-configuration wconf)))))
     ((error user-error debug)
      (message "Lookup handler %S: %s" handler e)
      nil)))
 
-(defun +lookup--jump-to (prop identifier &optional other-window)
-  (let ((result
-         (run-hook-wrapped
-          (plist-get (list :definition '+lookup-definition-functions
-                           :references '+lookup-references-functions
-                           :documentation '+lookup-documentation-functions
-                           :file '+lookup-file-functions)
-                     prop)
-          #'+lookup--run-handlers
-          identifier
-          (point-marker)
-          other-window)))
-    (if (not (markerp result))
-        (ignore (message "No lookup handler could find %S" identifier))
-      (funcall (if other-window
-                   #'switch-to-buffer-other-window
-                 #'switch-to-buffer)
-               (marker-buffer result))
-      (goto-char result)
-      (better-jumper-set-jump)
+(defun +lookup--jump-to (prop identifier &optional display-fn)
+  (let* ((origin (point-marker))
+         (result
+          (run-hook-wrapped
+           (plist-get (list :definition '+lookup-definition-functions
+                            :references '+lookup-references-functions
+                            :documentation '+lookup-documentation-functions
+                            :file '+lookup-file-functions)
+                      prop)
+           #'+lookup--run-handlers
+           identifier
+           origin)))
+    (when (cond ((null result)
+                 (message "No lookup handler could find %S" identifier)
+                 nil)
+                ((markerp result)
+                 (funcall (or display-fn #'switch-to-buffer)
+                          (marker-buffer result))
+                 (goto-char result)
+                 result)
+                (result))
+      (with-current-buffer (marker-buffer origin)
+        (better-jumper-set-jump (marker-position origin)))
       result)))
 
 
 ;;
 ;;; Lookup backends
 
+(defun +lookup--xref-show (fn identifier)
+  (let ((xrefs (funcall fn
+                        (xref-find-backend)
+                        identifier)))
+    (when xrefs
+      (xref--show-xrefs xrefs nil)
+      (if (cdr xrefs)
+          'deferred
+        t))))
+
 (defun +lookup-xref-definitions-backend (identifier)
   "Non-interactive wrapper for `xref-find-definitions'"
-  (xref-find-definitions identifier))
+  (+lookup--xref-show 'xref-backend-definitions identifier))
 
 (defun +lookup-xref-references-backend (identifier)
   "Non-interactive wrapper for `xref-find-references'"
-  (xref-find-references identifier))
+  (+lookup--xref-show 'xref-backend-references identifier))
 
 (defun +lookup-dumb-jump-backend (_identifier)
   "Look up the symbol at point (or selection) with `dumb-jump', which conducts a

If it doesn't change the current buffer, or it returns nil, the lookup module
will fall back to the next handler in `+lookup-definition-functions',
`+lookup-references-functions', `+lookup-file-functions' or
`+lookup-documentation-functions'."
  (declare (indent defun))
  (dolist (mode (doom-enlist modes))
    (let ((hook (intern (format "%s-hook" mode)))
          (fn   (intern (format "+lookup|init-%s" mode))))
      (cond ((null (car plist))
             (remove-hook hook fn)
             (delq! mode +lookup--handler-alist 'assq)
             (unintern fn nil))
            ((fset fn
                   (lambda ()

  (when spec
    (cl-destructuring-bind (fn . plist)
        (doom-enlist spec)
      (put fn '+lookup-async (or (plist-get plist :async) async))
      (add-hook functions-var fn nil t))))

(defun +lookup--symbol-or-region (&optional initial)
  "Grab the symbol at point or selected region."
  (cond ((stringp initial)
         initial)
        ((use-region-p)
         (buffer-substring-no-properties (region-beginning)
                                         (region-end)))
        ((require 'xref nil t)
         ;; A little smarter than using `symbol-at-point', though in most cases,
         ;; xref ends up using `symbol-at-point' anyway.
         (xref-backend-identifier-at-point (xref-find-backend)))))

(defun +lookup--run-handler (handler identifier)
