Skip to content

Commit

Permalink
consult-locate also should override the default action
Browse files Browse the repository at this point in the history
  • Loading branch information
oantolin committed Apr 6, 2022
1 parent ba1762b commit 592287b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion embark-consult.el
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,14 @@ This function is meant to be added to `embark-collect-mode-hook'."
(setf (alist-get 'consult-grep embark-exporters-alist)
#'embark-consult-export-grep)

;;; Support for consult-find
;;; Support for consult-find and consult-locate

(setf (alist-get '(file . consult-find) embark-default-action-overrides)
#'find-file)

(setf (alist-get '(file . consult-locate) embark-default-action-overrides)
#'find-file)

(defun embark-consult--wait-for-find ()
(when (eq embark--command 'consult-find)
(add-hook 'embark--export-pre-revert-hook #'embark-consult--await nil t)))
Expand Down

0 comments on commit 592287b

Please sign in to comment.