completion/ivy: refactor ag/rg/pt/git-grep advice functions

They are no isolated to their evil use cases.
This commit is contained in:
Henrik Lissner 2018-03-18 22:00:14 -04:00
parent ff2f30f9b4
commit 8d72257aa6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 74 additions and 56 deletions

View file

@ -107,14 +107,7 @@ immediately runs it on the current candidate (ending the ivy session)."
(dolist (cmd '(counsel-ag counsel-rg counsel-pt))
(ivy-add-actions
cmd
'(("O" +ivy-git-grep-other-window-action "open in other window"))))
;; Removes character limit from `counsel-ag-function' and sets a jump point
;; for `evil'.
;;
;; This may need to be updated frequently, to meet changes upstream.
;; counsel-ag, counsel-rg and counsel-pt all use this function
(advice-add #'counsel-ag-function :override #'+ivy*counsel-ag-function))
'(("O" +ivy-git-grep-other-window-action "open in other window")))))
(def-package! counsel-projectile