Variable: treemacs-peek-mode

treemacs-peek-mode is a customizable variable defined in treemacs-peek-mode.el.

Value

nil

Documentation

Non-nil if Treemacs-Peek mode is enabled.

See the treemacs-peek-mode(var)/treemacs-peek-mode(fun) command for a description of this minor mode. Setting this variable directly does not take effect; either customize it (see the info node (emacs)Easy Customization) or call the function treemacs-peek-mode(var)/treemacs-peek-mode(fun).

Key Bindings

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))))