Variable: treemacs-follow-recenter-distance

treemacs-follow-recenter-distance is a customizable variable defined in treemacs-customization.el.

This variable is obsolete since v2.5; use treemacs-recenter-distance instead.

Value

0.1

Documentation

Minimum distance from the top/bottom for (tag-)follow mode to recenter.

Treemacs will be calling recenter after following a file/tag if the distance between point and the top/bottom of the treemacs window is less then this many lines. The value is not an absolute line count, but a percentage, with 0.0 being 0% and 1.0 being 100%. This means that when this variable is set to 0.1 recenter will be called within a 10% distance of the window top/bottom. For a window height of 40 lines that means point being within the first or last 4 lines of the treemacs window. Will only take effect if treemacs-recenter-after-tag-follow and/or treemacs-recenter-after-file-follow is non-nil.

Note that this does *not* take scroll-margin into account.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-customization.el
(defcustom treemacs-follow-recenter-distance 0.1
  "Minimum distance from the top/bottom for (tag-)follow mode to recenter.
Treemacs will be calling `recenter' after following a file/tag if the distance
between point and the top/bottom of the treemacs window is less then this many
lines.  The value is not an absolute line count, but a percentage, with 0.0
being 0% and 1.0 being 100%.  This means that when this variable is set to 0.1
`recenter' will be called within a 10% distance of the window top/bottom.  For a
window height of 40 lines that means point being within the first or last 4
lines of the treemacs window.
Will only take effect if `treemacs-recenter-after-tag-follow' and/or
`treemacs-recenter-after-file-follow' is non-nil.

Note that this does *not* take `scroll-margin' into account."
  :type 'float
  :group 'treemacs-follow)