[Emacs] Use helm-rg instead of helm-ag

This commit is contained in:
Ivan Malison 2023-03-13 01:22:06 -06:00
parent ba6cb0e102
commit 6db1d4a3f3

View File

@ -1789,6 +1789,9 @@ I use helm for almost all emacs completion
:defer 4 :defer 4
:config (helm-descbinds-mode 1)) :config (helm-descbinds-mode 1))
(use-package helm-rg
:demand t)
(use-package helm-ag (use-package helm-ag
:bind ("C-c p 1" . imalison:set-helm-ag-extra-options) :bind ("C-c p 1" . imalison:set-helm-ag-extra-options)
:preface :preface
@ -1825,7 +1828,7 @@ I use helm for almost all emacs completion
(projectile-find-file)) (projectile-find-file))
(defun imalison:switch-to-project-and-search (dir) (defun imalison:switch-to-project-and-search (dir)
(imalison:do-in-project dir (helm-projectile-ag))) (imalison:do-in-project dir (helm-projectile-rg)))
(defun imalison:helm-term-projectile (dir) (defun imalison:helm-term-projectile (dir)
(imalison:do-in-project dir (term-projectile-forward)))) (imalison:do-in-project dir (term-projectile-forward))))
@ -1854,22 +1857,22 @@ I use helm for almost all emacs completion
("C-c p f" . imalison:projectile-find-file)) ("C-c p f" . imalison:projectile-find-file))
:preface :preface
(progn (progn
(defun imalison:do-ag-default-directory () (defun imalison:do-rg-default-directory ()
(interactive) (interactive)
(helm-do-ag default-directory (car (projectile-parse-dirconfig-file)))) (helm-rg--do-helm-rg default-directory (car (projectile-parse-dirconfig-file))))
(emit-prefix-selector imalison:do-ag (emit-prefix-selector imalison:do-rg
helm-projectile-ag helm-projectile-rg
imalison:do-ag-default-directory imalison:do-rg-default-directory
helm-do-ag) helm-rg--do-helm-rg)
(emit-prefix-selector imalison:projectile-find-file (emit-prefix-selector imalison:projectile-find-file
projectile-find-file projectile-find-file
projectile-find-file-other-window) projectile-find-file-other-window)
(imalison:let-around imalison:set-options-do-ag (imalison:let-around imalison:set-options-do-rg
imalison:do-ag imalison:do-rg
(helm-ag-always-set-extra-option t)) (helm-rg-always-set-extra-option t))
(defun imalison:projectile-make-all-subdirs-projects (directory) (defun imalison:projectile-make-all-subdirs-projects (directory)
(cl-loop for file-info in (directory-files-and-attributes directory) (cl-loop for file-info in (directory-files-and-attributes directory)
@ -1891,8 +1894,8 @@ I use helm for almost all emacs completion
(setq projectile-git-submodule-command nil) (setq projectile-git-submodule-command nil)
(add-to-list 'projectile-globally-ignored-files "Godeps") (add-to-list 'projectile-globally-ignored-files "Godeps")
(diminish 'projectile-mode) (diminish 'projectile-mode)
(bind-key* "C-c p s" 'imalison:do-ag) (bind-key* "C-c p s" 'imalison:do-rg)
(bind-key* "C-c p S" 'imalison:set-options-do-ag) (bind-key* "C-c p S" 'imalison:set-options-do-rg)
(bind-key* "C-c p f" 'imalison:projectile-find-file))) (bind-key* "C-c p f" 'imalison:projectile-find-file)))
#+END_SRC #+END_SRC
** ido ** ido