Minor changes on `helm` layer (#14088)

* Added `helm-ag-success-exit-status` when using `rg`

It's been advised by the upstream of `helm-ag` to set
`helm-ag-success-exit-status` to `'(0 2)`.

This commit adds this.

ref: https://github.com/emacsorphanage/helm-ag#helm-agel-with-other-searching-tools

Signed-off-by: Lucius Hu <lebensterben@users.noreply.github.com>

* Use `magit-status-setup-buffer` instead of `vcr-dir`

This is suggested by the package itself.
Ref: 4da1a53f2f/helm-ls-git.el (L184-L189)

Co-authored-by: Lucius Hu <lebensterben@users.noreply.github.com>
This commit is contained in:
Lucius Hu 2020-10-26 18:11:54 -04:00 committed by GitHub
parent 5884aa9aaa
commit 3c35407968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -297,7 +297,8 @@ If DEFAULT-INPUTP is non nil then the current region or symbol at point
;; --line-number forces line numbers (disabled by default on windows)
;; no --vimgrep because it adds column numbers that wgrep can't handle
;; see https://github.com/syl20bnr/spacemacs/pull/8065
(let ((helm-ag-base-command "rg --smart-case --no-heading --color=never --line-number --max-columns=150"))
(let ((helm-ag-base-command "rg --smart-case --no-heading --color=never --line-number --max-columns=150")
(helm-ag-success-exit-status '(0 2)))
(helm-do-ag-buffers)))
(defun spacemacs/helm-buffers-do-rg-region-or-symbol ()

View File

@ -302,7 +302,13 @@
(defun helm/init-helm-ls-git ()
(use-package helm-ls-git
:defer t
:init (spacemacs/set-leader-keys "gff" 'helm-ls-git-ls)))
:init (spacemacs/set-leader-keys "gff" 'helm-ls-git-ls)
:config
;; Set `helm-ls-git-status-command' conditonally on `git' layer
;; If `git' is in use, use default `\'magit-status-setup-buffer'
;; Otherwise, use defaault `\'vc-dir'
(when (configuration-layer/package-usedp 'magit)
(setq helm-ls-git-status-command 'magit-status-setup-buffer))))
(defun helm/init-helm-make ()
(use-package helm-make