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.
This commit is contained in:
parent
f1d89bf9c2
commit
ee1c2b4ef6
1 changed files with 3 additions and 3 deletions
|
@ -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)))))
|
(rxt-quote-pcre (doom-thing-at-point-or-region)))))
|
||||||
directory args
|
directory args
|
||||||
(or prompt
|
(or prompt
|
||||||
(format "rg%s [%s]: "
|
(format "Search project [%s]: "
|
||||||
args
|
|
||||||
(cond ((equal directory default-directory)
|
(cond ((equal directory default-directory)
|
||||||
"./")
|
"./")
|
||||||
((equal directory project-root)
|
((equal directory project-root)
|
||||||
(projectile-project-name))
|
(projectile-project-name))
|
||||||
((file-relative-name directory project-root))))))))
|
((file-relative-name directory project-root)))
|
||||||
|
(string-trim args))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +ivy/project-search (&optional arg initial-query directory)
|
(defun +ivy/project-search (&optional arg initial-query directory)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue