commit 2964708de642912e3b8c42e869bcaa6a837cf995
parent 8f28c1dee82a931b4c92ef41ae933c1cf7b091e3
Author: Vincent Demeester <vincent@sbr.pm>
Date: Fri, 24 Sep 2021 11:29:19 +0200
tools/emacs: make consult aware of project…
… and prefix project-compile buffers
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/emacs/config/config-completion.el b/tools/emacs/config/config-completion.el
@@ -165,6 +165,10 @@ instead."
:config
(setq consult-async-input-debounce 0.5)
(setq consult-async-input-throttle 0.8)
+ (setq consult-project-root-function
+ (lambda ()
+ (when-let (project (project-current))
+ (car (project-roots project)))))
:bind (("M-X" . consult-mode-command)
("M-s i" . consult-imenu)
("M-s s" . consult-outline) ; M-s o is `occur'
diff --git a/tools/emacs/config/config-projects.el b/tools/emacs/config/config-projects.el
@@ -10,6 +10,7 @@
:bind (("C-x p v" . vde-project-magit-status)
("C-x p s" . vde-project-vterm))
:init
+ (setq-default project-compilation-buffer-name-function 'project-prefixed-buffer-name)
(defun vde-project-magit-status ()
"Run `magit-status' on project."
(interactive)
@@ -31,8 +32,7 @@ switch to it. Otherwise, create a new vterm shell."
(vterm vterm-buffer)
(with-current-buffer vterm-buffer
(vterm-send-string cd-cmd)
- (vterm-send-return))))))
- )
+ (vterm-send-return)))))))
(use-package projectile
:unless noninteractive