home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 0c90690360ae704524afc12398572ca54cb6d4f0
parent ef5df9e7181481ba32969eac518da5d483d42d9e
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed, 29 Nov 2023 18:25:27 +0100

tools/emacs: make rg projects aware…

It was still "relying" on projectile...

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Mtools/emacs/config/config-search.el | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/emacs/config/config-search.el b/tools/emacs/config/config-search.el @@ -102,11 +102,11 @@ confines of word boundaries (e.g. multiple words)." (cl-pushnew '("tmpl" . "*.tmpl") rg-custom-type-aliases) (cl-pushnew '("gotest" . "*_test.go") rg-custom-type-aliases) (defun vde/rg-buffer-name () - "Generate a rg buffer name from projectile if bound" - (cond ((boundp 'projectile-project-name) (if (string-equal (projectile-project-name) "-") - "rg" - (format "rg: %s" (projectile-project-name)))) - (t "rg"))) + "Generate a rg buffer name from project if in one" + (let ((p (project-current))) + (if p + (format "rg: %s" (abbreviate-file-name (cdr p))) + "rg"))) (setq rg-buffer-name #'vde/rg-buffer-name)) ;; -UseRG