Treat +ivy/project-search & +default/project-search as counsel-rg
This gives the former commands access to any actions (on C-o) or counsel configuration meant for counsel-rg.
This commit is contained in:
parent
defbed9ac1
commit
e6de13b4c9
3 changed files with 7 additions and 3 deletions
|
@ -52,7 +52,8 @@ workspace."
|
|||
(unless (executable-find "rg")
|
||||
(user-error "Couldn't find ripgrep in your PATH"))
|
||||
(require 'helm-rg)
|
||||
(let ((helm-rg-default-directory (or in (doom-project-root) default-directory))
|
||||
(let ((this-command 'helm-rg)
|
||||
(helm-rg-default-directory (or in (doom-project-root) default-directory))
|
||||
(helm-rg-default-extra-args
|
||||
(delq nil (list (when all-files "-z -uu")
|
||||
(unless recursive "--maxdepth 1")))))
|
||||
|
|
|
@ -252,7 +252,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees."
|
|||
(unless (executable-find "rg")
|
||||
(user-error "Couldn't find ripgrep in your PATH"))
|
||||
(require 'counsel)
|
||||
(let* ((ivy-more-chars-alist '((t . 1)))
|
||||
(let* ((this-command 'counsel-rg)
|
||||
(project-root (or (doom-project-root) default-directory))
|
||||
(directory (or in project-root))
|
||||
(args (concat (if all-files " -uu")
|
||||
|
|
|
@ -40,7 +40,10 @@ This uses a search algorithm other than ivy's default.")
|
|||
`((counsel-rg . +ivy-standard-search)
|
||||
(swiper . +ivy-standard-search)
|
||||
(swiper-isearch . +ivy-standard-search)
|
||||
(t . +ivy-alternative-search)))
|
||||
(t . +ivy-alternative-search))
|
||||
ivy-more-chars-alist
|
||||
'((counsel-rg . 1)
|
||||
(t . 3)))
|
||||
|
||||
(define-key!
|
||||
[remap switch-to-buffer] #'+ivy/switch-buffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue