From f9dfb7e92ad134884b30ec5c9d7045160d4eb7d5 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 1 Jul 2024 18:06:21 -0400 Subject: [PATCH] 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 --- modules/ui/treemacs/autoload.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ui/treemacs/autoload.el b/modules/ui/treemacs/autoload.el index 9d01f1d8a..06b397b0f 100644 --- a/modules/ui/treemacs/autoload.el +++ b/modules/ui/treemacs/autoload.el @@ -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)))))