fix(treemacs): persp-mode compatibility

The signature of `persp-activated-functions` changed upstream in
persp-mode (bumped in a1121ac), but treemacs hasn't updated its usage of
it yet.

Ref: #8454
Amend: a1121acc94
This commit is contained in:
Henrik Lissner
2025-08-11 02:25:46 +02:00
parent 10bfda2351
commit 751ac6134b

View File

@ -29,6 +29,14 @@ This must be set before `treemacs' has loaded.")
;; Don't follow the cursor (it's more disruptive/jarring than helpful as a default)
(treemacs-follow-mode -1)
;; HACK: persp-mode changed the signature for `persp-activated-functions', but
;; treemacs hasn't updated its usage yet.
;; REVIEW: PR upstream
(remove-hook 'persp-activated-functions #'treemacs--remove-treemacs-window-in-new-frames)
(add-hook! 'persp-activated-functions
(defun +treemacs--remove-treemacs-window-in-new-frames-h (type &rest _)
(treemacs--remove-treemacs-window-in-new-frames type)))
(set-popup-rule! "^ ?\\*Treemacs" :ignore t)
(when +treemacs-git-mode
;; If they aren't supported, fall back to simpler methods