        (let ((docsets (+lookup-docsets-for-buffer)))
          (when (cl-some #'+lookup-docset-installed-p docsets)
            (+lookup/in-docsets identifier docsets)
-           t))))
+           'deferred))))
 
 
 ;;
 ;;; Main commands
 
 ;;;###autoload
-(defun +lookup/definition (identifier &optional other-window)
+(defun +lookup/definition (identifier)
   "Jump to the definition of IDENTIFIER (defaults to the symbol at point).
-
-If OTHER-WINDOW (universal argument), open the result in another window.
 
 Each function in `+lookup-definition-functions' is tried until one changes the
 point or current buffer. Falls back to dumb-jump, naive
 ripgrep/the_silver_searcher text search, then `evil-goto-definition' if
 evil-mode is active."
-  (interactive
-   (list (+lookup--symbol-or-region)
-         current-prefix-arg))
+  (interactive (list (+lookup--symbol-or-region)))
   (cond ((null identifier) (user-error "Nothing under point"))
-
-        ((+lookup--jump-to :definition identifier other-window))
-
-        ((error "Couldn't find the definition of '%s'" identifier))))
-
-;;;###autoload
-(defun +lookup/references (identifier &optional other-window)
+        ((+lookup--jump-to :definition identifier))
+        ((error "Couldn't find the definition of %S" identifier))))
+
+;;;###autoload
+(defun +lookup/references (identifier)
   "Show a list of usages of IDENTIFIER (defaults to the symbol at point)
 
 Tries each function in `+lookup-references-functions' until one changes the
 point and/or current buffer. Falls back to a naive ripgrep/the_silver_searcher
 search otherwise."
-  (interactive
-   (list (+lookup--symbol-or-region)
-         current-prefix-arg))
+  (interactive (list (+lookup--symbol-or-region)))
   (cond ((null identifier) (user-error "Nothing under point"))
-
-        ((+lookup--jump-to :references identifier other-window))
-
-        ((error "Couldn't find references of '%s'" identifier))))
-
-;;;###autoload
-(defun +lookup/documentation (identifier &optional _arg)
+        ((+lookup--jump-to :references identifier))
+        ((error "Couldn't find references of %S" identifier))))
+
+;;;###autoload
+(defun +lookup/documentation (identifier)
   "Show documentation for IDENTIFIER (defaults to symbol at point or selection.
 
 First attempts the :documentation handler specified with `set-lookup-handlers!'
 for the current mode/buffer (if any), then falls back to the backends in
 `+lookup-documentation-functions'."
-  (interactive
-   (list (+lookup--symbol-or-region)
-         current-prefix-arg))
-  (cond ((+lookup--jump-to :documentation identifier t))
-
-        ((user-error "Couldn't find documentation for '%s'" identifier))))
+  (interactive (list (+lookup--symbol-or-region)))
+  (cond ((+lookup--jump-to :documentation identifier 'pop-to-buffer))
+        ((user-error "Couldn't find documentation for %S" identifier))))
 
 (defvar ffap-file-finder)
 ;;;###autoload

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 ()

      (call-interactively handler)
    (funcall handler identifier)))

(defun +lookup--run-handlers (handler identifier origin)
  (doom-log "Looking up '%s' with '%s'" identifier handler)
  (condition-case e
      (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 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'"
  (+lookup--xref-show 'xref-backend-definitions identifier))

(defun +lookup-xref-references-backend (identifier)
  "Non-interactive wrapper for `xref-find-references'"
  (+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
