From da3899e8d73c56a27e33a70aca71d00742307fce Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Fri, 17 Jul 2026 17:38:33 -0700 Subject: emacs: Add grep settings --- _mbsetupuser/.emacs.d/init.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to '_mbsetupuser') diff --git a/_mbsetupuser/.emacs.d/init.el b/_mbsetupuser/.emacs.d/init.el index 4f5be0e..598dc9a 100644 --- a/_mbsetupuser/.emacs.d/init.el +++ b/_mbsetupuser/.emacs.d/init.el @@ -180,6 +180,32 @@ :config (setq combobulate-prefix "C-c o")) +(use-package grep + :config + (require 'find-dired) + + (add-to-list 'grep-files-aliases '("msbuild" . "*.targets *.proj")) + (add-to-list 'grep-files-aliases '("typescript" . "*.ts *.tsx *.js *.jsx *.json")) + (add-to-list 'grep-files-aliases '("vue" . "*.vue *.js *.jsx *.json")) + + (when (eq system-type 'windows-nt) + (setq find-program (shell-quote-argument "c:/cygwin64/bin/find.exe")) + (setq grep-program (shell-quote-argument "c:/cygwin64/bin/grep.exe")) + (setq grep-use-null-device nil) + + (let ((exe (shell-quote-argument "c:/cygwin64/bin/ls.exe"))) + (setq find-ls-option + (cons (concat "-exec " exe " -ld {} \";\"") "-ld")))) + + (setf (map-elt display-buffer-alist (rx bos "*grep*" eos)) + '(display-buffer-in-side-window + (side . bottom) + (slot . 0) + (window-height . 0.33))) + + (add-to-list 'grep-find-ignored-directories ".cask") + + (add-hook 'grep-mode-hook 'hl-line-mode)) (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (load custom-file) -- cgit v1.3-2-g0d8e