First commit.

This commit is contained in:
2022-01-09 21:19:46 +01:00
commit df36844dcc
107 changed files with 6565 additions and 0 deletions

32
lisp/utilities/ag.el Normal file
View File

@@ -0,0 +1,32 @@
;;; ag.el --- interface to The Silver Searcher -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code: https://github.com/emacsorphanage/helm-ag
(with-executable 'ag
(when (feature-p 'helm)
(use-package helm-ag
:defer
:config
(validate-setq
;; Insert word at point as search term.
helm-ag-insert-at-point 'word)))
(use-package ag
:defer
:init
(if (and (feature-p 'projectile)
(fboundp 'projectile-ag))
(global-set-key [remap find-grep] 'projectile-ag)
(global-set-key [remap find-grep] 'ag))
:config
(validate-setq
ag-project-root-function
'(lambda ()
(with-project project (path-buffer-abs)
(user/proj-root project))))
;; Search inside compressed files.
(add-to-list 'ag-arguments "--search-zip")))
(provide 'utilities/ag)
;;; ag.el ends here