[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 92f54f6 150/184: ivy.el (ivy-configure): Add :grep-p
From: |
Oleh Krehel |
Subject: |
[elpa] master 92f54f6 150/184: ivy.el (ivy-configure): Add :grep-p |
Date: |
Wed, 16 Oct 2019 13:15:12 -0400 (EDT) |
branch: master
commit 92f54f610a3bdf441fa50688afe9e52f340abc53
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-configure): Add :grep-p
---
counsel.el | 21 +++++++++++----------
ivy.el | 7 +++++--
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/counsel.el b/counsel.el
index 3c09384..7b6aaac 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1514,9 +1514,8 @@ When CMD is non-nil, prompt for a specific \"git grep\"
command."
:occur #'counsel-git-grep-occur
:unwind-fn #'counsel--grep-unwind
:index-fn #'ivy-recompute-index-swiper-async
- :display-transformer-fn #'counsel-git-grep-transformer)
-
-(cl-pushnew 'counsel-git-grep ivy-highlight-grep-commands)
+ :display-transformer-fn #'counsel-git-grep-transformer
+ :grep-p t)
(defun counsel-git-grep-proj-function (str)
"Grep for STR in the current Git repository."
@@ -2849,7 +2848,8 @@ CALLER is passed to `ivy-read'."
(ivy-configure 'counsel-ag
:occur #'counsel-ag-occur
:unwind-fn #'counsel--grep-unwind
- :display-transformer-fn #'counsel-git-grep-transformer)
+ :display-transformer-fn #'counsel-git-grep-transformer
+ :grep-p t)
(defun counsel-cd ()
"Change the directory for the currently running Ivy grep-like command.
@@ -2860,8 +2860,6 @@ Works for `counsel-git-grep', `counsel-ag', etc."
(ivy-quit-and-run
(funcall (ivy-state-caller ivy-last) input new-dir))))
-(cl-pushnew 'counsel-ag ivy-highlight-grep-commands)
-
(defun counsel-grep-like-occur (cmd-template)
(unless (eq major-mode 'ivy-occur-grep-mode)
(ivy-occur-grep-mode)
@@ -2908,7 +2906,11 @@ This uses `counsel-ag' with `counsel-pt-base-command'
instead of
(let ((counsel-ag-base-command counsel-pt-base-command)
(counsel--grep-tool-look-around nil))
(counsel-ag initial-input :caller 'counsel-pt)))
-(cl-pushnew 'counsel-pt ivy-highlight-grep-commands)
+
+(ivy-configure 'counsel-pt
+ :unwind-fn #'counsel--grep-unwind
+ :display-transformer-fn #'counsel-git-grep-transformer
+ :grep-p t)
;;** `counsel-ack'
(defcustom counsel-ack-base-command
@@ -2984,9 +2986,8 @@ Example input with inclusion and exclusion file patterns:
(ivy-configure 'counsel-rg
:occur #'counsel-ag-occur
:unwind-fn #'counsel--grep-unwind
- :display-transformer-fn #'counsel-git-grep-transformer)
-
-(cl-pushnew 'counsel-rg ivy-highlight-grep-commands)
+ :display-transformer-fn #'counsel-git-grep-transformer
+ :grep-p t)
;;** `counsel-grep'
(defvar counsel-grep-map
diff --git a/ivy.el b/ivy.el
index 247e5b2..8ff3464 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1919,7 +1919,8 @@ May supersede `ivy-initial-inputs-alist'."
unwind-fn
index-fn
display-transformer-fn
- more-chars)
+ more-chars
+ grep-p)
"Configure `ivy-read' params for CALLER."
(declare (indent 1))
(when initial-input
@@ -1935,7 +1936,9 @@ May supersede `ivy-initial-inputs-alist'."
(when display-transformer-fn
(ivy-set-display-transformer caller display-transformer-fn))
(when more-chars
- (ivy--alist-set 'ivy-more-chars-alist caller more-chars)))
+ (ivy--alist-set 'ivy-more-chars-alist caller more-chars))
+ (when grep-p
+ (cl-pushnew caller ivy-highlight-grep-commands)))
(defcustom ivy-sort-max-size 30000
"Sorting won't be done for collections larger than this."
- [elpa] master 09c40fc 175/184: swiper.el (swiper--occur-insert-lines): Simplify, (continued)
- [elpa] master 09c40fc 175/184: swiper.el (swiper--occur-insert-lines): Simplify, Oleh Krehel, 2019/10/16
- [elpa] master c69deb2 179/184: ivy.el: "~~" now works as expected for /sudo::, Oleh Krehel, 2019/10/16
- [elpa] master 24a6354 170/184: ivy.el (ivy--format): Improve docstring, Oleh Krehel, 2019/10/16
- [elpa] master 0d842e3 062/184: ivy.el (ivy-switch-buffer): Clean up, Oleh Krehel, 2019/10/16
- [elpa] master 560957f 074/184: Check if ivy--done is accepting a string., Oleh Krehel, 2019/10/16
- [elpa] master 3b4956a 123/184: counsel.el (counsel-evil-registers-height): Remove obsolete var, Oleh Krehel, 2019/10/16
- [elpa] master a1bb702 128/184: Nicer message when counsel-git-grep finds no match, Oleh Krehel, 2019/10/16
- [elpa] master 5d2938f 126/184: counsel.el (counsel-git-grep): Works with ivy--regex-fuzzy, Oleh Krehel, 2019/10/16
- [elpa] master 3a37741 147/184: swiper.el (swiper--update-input-ivy): Set case-fold-search, Oleh Krehel, 2019/10/16
- [elpa] master dea98fc 153/184: ivy.el (ivy-inhibit-action): Clean up docstring, Oleh Krehel, 2019/10/16
- [elpa] master 92f54f6 150/184: ivy.el (ivy-configure): Add :grep-p,
Oleh Krehel <=
- [elpa] master abe5aa8 006/184: ivy.el (ivy-resume): Select original buffer for search functions, Oleh Krehel, 2019/10/16
- [elpa] master bfe4454 021/184: Fix swiper--isearch-filter-ignore-order return value, Oleh Krehel, 2019/10/16
- [elpa] master bb65c4e 039/184: swiper.el (swiper--current-window-start): Refactor, Oleh Krehel, 2019/10/16
- [elpa] master 76fff20 114/184: counsel-M-x: Propertize names of active modes., Oleh Krehel, 2019/10/16
- [elpa] master bfdda68 111/184: swiper.el (swiper-occur): Use ivy-occur-next-error, Oleh Krehel, 2019/10/16
- [elpa] master 84e1ab8 117/184: counsel.el (counsel-package): Refresh contents automatically, Oleh Krehel, 2019/10/16
- [elpa] master 9d3d7de 132/184: counsel.el (counsel-slime-repl-history): Add., Oleh Krehel, 2019/10/16
- [elpa] master 9e1b9a0 131/184: counsel.el (counsel-google-function): Add missing require, Oleh Krehel, 2019/10/16
- [elpa] master 5ff8b5e 133/184: ivy.el (ivy-completion-in-region-action): Use declare-function., Oleh Krehel, 2019/10/16
- [elpa] master 78dd554 134/184: ivy.el (ivy--exhibit): Handle ivy--reset-state initial call, Oleh Krehel, 2019/10/16