tweak(lib): doom-project-find-file: use transient project
If DIR is not a project and does not have root markers, create a
transient project instead. This ensures that `project-find-file-in`, and
by extension vertico, is still used in non-project directories instead
of falling back to `find-file`
Ref: 1b0af3bfc7
This commit is contained in:
parent
1cc83dce35
commit
d7075b2420
1 changed files with 3 additions and 2 deletions
|
@ -152,11 +152,12 @@ If DIR is not a project, it will be indexed (but not cached)."
|
||||||
((and (bound-and-true-p ivy-mode)
|
((and (bound-and-true-p ivy-mode)
|
||||||
(fboundp 'counsel-file-jump))
|
(fboundp 'counsel-file-jump))
|
||||||
(call-interactively #'counsel-file-jump))
|
(call-interactively #'counsel-file-jump))
|
||||||
((when-let ((pr (project-current nil dir)))
|
|
||||||
(project-find-file-in nil nil pr)))
|
|
||||||
((and (bound-and-true-p helm-mode)
|
((and (bound-and-true-p helm-mode)
|
||||||
(fboundp 'helm-find-files))
|
(fboundp 'helm-find-files))
|
||||||
(call-interactively #'helm-find-files))
|
(call-interactively #'helm-find-files))
|
||||||
|
((when-let ((project-current-directory-override t)
|
||||||
|
(pr (project-current t dir)))
|
||||||
|
(project-find-file-in nil nil pr)))
|
||||||
((call-interactively #'find-file)))))
|
((call-interactively #'find-file)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue