 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)
+  (interactive (list (+lookup-thing-or-region)
                      current-prefix-arg))
   (cond ((null identifier) (user-error "Nothing under point"))
         ((+lookup--jump-to :references identifier nil arg))

(defun +lookup/dictionary-definition (identifier &optional arg)
  "Look up the definition of the word at point (or selection)."
  (interactive
   (list (+lookup-symbol-or-region)
         current-prefix-arg))
  (unless (featurep! +dictionary)
    (user-error "The +dictionary feature hasn't be enabled on :tools lookup module"))
  (cond ((and IS-MAC (require 'osx-dictionary nil t))
         (osx-dictionary--view-result identifier))
        (+lookup-dictionary-enable-online
         (define-word identifier nil arg))
        ;; TODO Implement offline dictionary backend
        ((user-error "No offline dictionary defined yet"))))

;;;###autoload
(defun +lookup/synonyms (identifier &optional arg)
  "Look up and insert a synonym for the word at point (or selection)."
  (interactive
   (list (+lookup-symbol-or-region)
         current-prefix-arg))
  (unless (featurep! +dictionary)
    (user-error "The +dictionary feature hasn't be enabled on :tools lookup module"))
  (unless +lookup-dictionary-enable-online
    ;; TODO Implement offline synonyms backend
    (user-error "No offline dictionary implemented yet"))
  ;; Necessary because powerthesaurus lacks a way to pass text directly
  (with-temp-buffer
    (insert identifier)
    ;; HACK I'd rather use `+lookup-symbol-or-region' for consistency, but
    ;;      powerthesaurus lacks a simple way to pass a string directly to any
    ;;      of its lookup functions, so...
    (cl-letf (((symbol-function 'use-region-p) (lambda () t)))
      (powerthesaurus-lookup-word (point-min) (point-max)))))

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-thing-or-region)
                     current-prefix-arg))
  (cond ((null identifier) (user-error "Nothing under point"))
        ((+lookup--jump-to :definition identifier nil arg))
