Variable: treemacs-collapse-dirs

treemacs-collapse-dirs is a customizable variable defined in treemacs-customization.el.

Value

0

Documentation

When > 0 treemacs will collapse directories into one when possible.

A directory is collapsible when its content consists of nothing but another directory.

The value determines how many directories can be collapsed at once, both as a performance cap and to prevent too long directory names in the treemacs view.

To minimise this option's impact on display performance the search for directories to collapse is done asynchronously in a python script and will thus only work when python installed. The script should work both on python 2 and 3.

If you experience incorrect display of CJK characters while using this feature you have to inform Emacs about your language environment using set-language-environment.

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-customization.el
(defcustom treemacs-collapse-dirs 0
  "When > 0 treemacs will collapse directories into one when possible.
A directory is collapsible when its content consists of nothing but another
directory.

The value determines how many directories can be collapsed at once, both as a
performance cap and to prevent too long directory names in the treemacs view.

To minimise this option's impact on display performance the search for
directories to collapse is done asynchronously in a python script and will thus
only work when python installed.  The script should work both on python 2 and 3.

If you experience incorrect display of CJK characters while using this feature
you have to inform Emacs about your language environment using
`set-language-environment'."
  :type 'integer
  :group 'treemacs)