tweak(treemacs): use treemacs-add-and-display-current-project-exclusively

Folks seem to expect to *only* see the current project in the treemacs
pane when they open it. I sort of agree, so I've tweaked
+treemacs/toggle (on SPC o p) to use
`treemacs-add-and-display-current-project-exclusively` instead.

Fix: #7614
This commit is contained in:
Henrik Lissner 2024-07-01 18:06:21 -04:00
parent 5da8304c46
commit f9dfb7e92a
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -12,6 +12,6 @@ Use `treemacs' command for old functionality."
(require 'treemacs)
(pcase (treemacs-current-visibility)
(`visible (delete-window (treemacs-get-local-window)))
(_ (if (doom-project-p)
(treemacs-add-and-display-current-project)
(_ (if (treemacs--find-current-user-project)
(treemacs-add-and-display-current-project-exclusively)
(treemacs)))))