Variable: treemacs-peek-mode-hook
treemacs-peek-mode-hook is a customizable variable defined in
treemacs-peek-mode.el.
Value
nil
Documentation
Hook run after entering or leaving treemacs-peek-mode(var)/treemacs-peek-mode(fun).
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-peek-mode.el
;;;###autoload
(define-minor-mode treemacs-peek-mode
"Minor mode that allows you to peek at buffers before deciding to open them.
While the mode is active treemacs will automatically display the file at point,
without leaving the treemacs window.
Peeking will stop when you leave the treemacs window, be it through a command
like `treemacs-RET-action' or some other window selection change.
Files' buffers that have been opened for peeking will be cleaned up if they did
not exist before peeking started.
The peeked window can be scrolled using
`treemacs-next/previous-line-other-window' and
`treemacs-next/previous-page-other-window'"
:init-value nil
:global t
:lighter nil
:group 'treemacs
(if treemacs-peek-mode
(progn
(unless (boundp 'window-selection-change-functions)
(user-error "%s %s"
"Peek-mode is only available in Emacs"
"versions that support `window-selection-change-functions'"))
(treemacs--setup-peek-mode))
(treemacs--tear-down-peek-mode (called-interactively-p 'interactive))))