Variable: treemacs-file-extension-regex

treemacs-file-extension-regex is a customizable variable defined in treemacs-customization.el.

Value

"\\.[^.]*\\'"

Documentation

Decides how treemacs determines a file's extension.

There are 2 options:
 - An extension should be everything past the *last* period of the file name.
   In this case this should be set to treemacs-last-period-regex-value
 - An extension should be everything past the *first* period of the file name.
   In this case this should be set to treemacs-first-period-regex-value

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-customization.el
(defcustom treemacs-file-extension-regex treemacs-last-period-regex-value
  "Decides how treemacs determines a file's extension.
There are 2 options:
 - An extension should be everything past the *last* period of the file name.
   In this case this should be set to `treemacs-last-period-regex-value'
 - An extension should be everything past the *first* period of the file name.
   In this case this should be set to `treemacs-first-period-regex-value'"
  :group 'treemacs
  :type `(choice (const :tag "Text after first period" ,treemacs-first-period-regex-value)
                 (const :tag "Text after last period" ,treemacs-last-period-regex-value)))