Variable: treemacs-project-follow-mode
treemacs-project-follow-mode is a customizable variable defined in
treemacs-project-follow-mode.el.
Value
nil
Documentation
Non-nil if Treemacs-Project-Follow mode is enabled.
See the treemacs-project-follow-mode(var)/treemacs-project-follow-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-project-follow-mode(var)/treemacs-project-follow-mode(fun).
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-project-follow-mode.el
;;;###autoload
(define-minor-mode treemacs-project-follow-mode
"Toggle `treemacs-only-current-project-mode'.
This is a minor mode meant for those who do not care about treemacs' workspace
features, or its preference to work with multiple projects simultaneously. When
enabled it will function as an automated version of
`treemacs-display-current-project-exclusively', making sure that, after a small
idle delay, the current project, and *only* the current project, is displayed in
treemacs.
The project detection is based on the current buffer, and will try to determine
the project using the following methods, in the order they are listed:
- the current projectile.el project, if `treemacs-projectile' is installed
- the current project.el project
- the current `default-directory'
The update will only happen when treemacs is in the foreground, meaning a
treemacs window must exist in the current scope.
This mode requires at least Emacs version 27 since it relies on
`window-buffer-change-functions' and `window-selection-change-functions'."
:init-value nil
:global t
:lighter nil
:group 'treemacs
(if treemacs-project-follow-mode
(progn
(unless (and (boundp 'window-buffer-change-functions)
(boundp 'window-selection-change-functions))
(user-error "%s %s"
"Project-Follow-Mode is only available in Emacs"
"versions that support `window-buffer-change-functions'"))
(treemacs--setup-project-follow-mode))
(treemacs--tear-down-project-follow-mode)))