From ee1c2b4ef6eb317a89400212a690eec61583e24d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 26 Feb 2021 21:30:23 -0500 Subject: [PATCH] Use "Search Project [project]" prompt for file search Perhaps less useful to rg vets, but less scary for beginners. That said, the default rg arguments aren't particularly interesting or surprising that they need to be announced. --- modules/completion/ivy/autoload/ivy.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index f005b5632..66e834df5 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -289,13 +289,13 @@ The point of this is to avoid Emacs locking up indexing massive file trees." (rxt-quote-pcre (doom-thing-at-point-or-region))))) directory args (or prompt - (format "rg%s [%s]: " - args + (format "Search project [%s]: " (cond ((equal directory default-directory) "./") ((equal directory project-root) (projectile-project-name)) - ((file-relative-name directory project-root)))))))) + ((file-relative-name directory project-root))) + (string-trim args)))))) ;;;###autoload (defun +ivy/project-search (&optional arg initial-query directory)