Skip to content

Commit

Permalink
Enable helm-follow-mode feature for helm-git-grep
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed Oct 24, 2021
1 parent 744cea0 commit 3f5f101
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
* [Customization](#customization)
* [Variables](#variables)
* [helm\-git\-grep\-sources](#helm-git-grep-sources)
* [helm\-follow\-mode\-persistent](#helm-follow-mode-persistent)
* [helm\-git\-grep\-candidate\-number\-limit](#helm-git-grep-candidate-number-limit)
* [helm\-git\-grep\-max\-length\-history](#helm-git-grep-max-length-history)
* [helm\-git\-grep\-use\-ioccur\-style\-keys](#helm-git-grep-use-ioccur-style-keys)
Expand Down Expand Up @@ -167,6 +168,17 @@ If you don't want to search in submodules, Set only `helm-git-grep-source` like

(setq helm-git-grep-sources '(helm-git-grep-source))

#### `helm-follow-mode-persistent`

Please set `helm-follow-mode-persistent` to non-nil if you want to use `helm-follow-mode` by default.

You must set it before loading `helm-git-grep.el`.

``` lisp
(custom-set-variables
'(helm-follow-mode-persistent t))
```

#### `helm-git-grep-candidate-number-limit`

**(Default: `300`)**
Expand Down
7 changes: 5 additions & 2 deletions helm-git-grep.el
Original file line number Diff line number Diff line change
Expand Up @@ -667,11 +667,14 @@ You can save your results in a helm-git-grep-mode buffer, see below.

(defvar helm-git-grep-source
(helm-make-source "Git Grep" 'helm-git-grep-class
:candidates-process 'helm-git-grep-process))
:candidates-process 'helm-git-grep-process
:follow (and helm-follow-mode-persistent 1)))

(defvar helm-git-grep-submodule-source
(helm-make-source "Git Submodule Grep" 'helm-git-grep-class
:candidates-process 'helm-git-grep-submodule-grep-process))
:candidates-process 'helm-git-grep-submodule-grep-process
:follow (and helm-follow-mode-persistent 1)))


(defun helm-git-grep-1 (&optional input)
"Execute helm git grep.
Expand Down

0 comments on commit 3f5f101

Please sign in to comment.