Fix consult preview
This commit is contained in:
10
init.el
10
init.el
@ -1715,7 +1715,15 @@ COMMAND and COMINT are like `compile'."
|
|||||||
(defun my/project-try-dotfile (dir)
|
(defun my/project-try-dotfile (dir)
|
||||||
(if-let (root (locate-dominating-file dir my/project-root-marker))
|
(if-let (root (locate-dominating-file dir my/project-root-marker))
|
||||||
(list 'vc nil root)))
|
(list 'vc nil root)))
|
||||||
(add-hook 'project-find-functions #'my/project-try-dotfile))
|
(add-hook 'project-find-functions #'my/project-try-dotfile)
|
||||||
|
;; `project-try-vc' causes consult file previews to break!
|
||||||
|
(defun my/project-try-vc-safe (dir)
|
||||||
|
(ignore-error file-error
|
||||||
|
(project-try-vc dir)))
|
||||||
|
(let ((cur-val (default-toplevel-value 'project-find-functions)))
|
||||||
|
(setq-default project-find-functions
|
||||||
|
(cl-nsubstitute 'my/project-try-vc-safe 'project-try-vc
|
||||||
|
cur-val))))
|
||||||
|
|
||||||
;; comint
|
;; comint
|
||||||
(use-package comint
|
(use-package comint
|
||||||
|
|||||||
Reference in New Issue
Block a user