emacsorphanage / helm-ag

The silver searcher with helm interface

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

make helm-ag-ignore-patterns works with rg.

zw963 opened this issue · comments

Because ag use --ignore PATTERN to Ignore files/directories whose names match this pattern. Literal file and directory names are also allowed.

But, when use with rg, we have to hard-code following function to support it.

e.g.

(defun helm-ag--construct-ignore-option (pattern)
  "Not documented, PATTERN."
  (concat "--glob=" pattern))  ;; => we have to change `--ignore` to `--glob=` to support rg

;; now, rg can work with ignore pattern.
 '(helm-ag-ignore-patterns '("!*~" "!#*#" "!*.min.*" "!TAGS" "!tags" "!.git/"))

@zw963 You might be interested in the thread at #16200, which might provide you some useful info.
Check it out and see if it helps. Just updating helm-ag fixed it for me.

where is the #16200 ?

where is the #16200 ?

@zw963, here: syl20bnr/spacemacs#16200

where is the #16200 ?

@zw963, here: syl20bnr/spacemacs#16200

Cool, nice, will try it later, thanks