diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 499d3d84a..e69ba4ae5 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -282,16 +282,6 @@ instead of switch-to-buffer-*." (set-popup-rule! "\\(^\\*Contents\\|'s annots\\*$\\)" :ignore t)) -;; `treemacs' -(after! treemacs - (set-popup-rule! "^ \\*Treemacs" :side 'left :size treemacs-width :quit nil :ttl 0) - (defun +popup*set-popup (&rest _) - "Create and setup a buffer for treemacs in the right position and size." - (pop-to-buffer (treemacs--get-framelocal-buffer)) - (treemacs--forget-last-highlight)) - (advice-add #'treemacs--setup-buffer :override #'+popup*set-popup)) - - ;; `wgrep' (progn ;; close the popup after you're done with a wgrep buffer diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index 9f596546d..7e6f399e0 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -9,11 +9,17 @@ treemacs-sorting 'alphabetic-desc treemacs-show-hidden-files t treemacs-goto-tag-strategy 'refetch-index - ;; for `treemacs-persistence' + treemacs-display-in-side-window t treemacs-persist-file (concat doom-cache-dir "treemacs-persist")) (after! treemacs + (set-popup-rule! "^ \\*Treemacs" + :side treemacs-position + :size treemacs-width + :quit nil + :ttl 0) + (defvar +treemacs-use-git-mode (pcase (cons (not (null (executable-find "git"))) (not (null (executable-find "python3"))))