Function: treemacs--std-ignore-file-predicate

treemacs--std-ignore-file-predicate is a byte-compiled function defined in treemacs-core-utils.el.

Signature

(treemacs--std-ignore-file-predicate FILE _)

Documentation

The default predicate to detect ignored files.

Will return t when FILE
1) starts with ".#" (lockfiles)
2) starts with "flycheck_" (flycheck temp files)
3) ends with "~" (backup files)
4) is surrounded with "#" (auto save files)
5) is ".git" (see also treemacs-hide-dot-git-directory)
6) is ".jj" (see also treemacs-hide-dot-jj-directory)
7) is "." or ".." (default dirs)

Source Code

;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(define-inline treemacs--std-ignore-file-predicate (file _)
  "The default predicate to detect ignored files.
Will return t when FILE
1) starts with \".#\" (lockfiles)
2) starts with \"flycheck_\" (flycheck temp files)
3) ends with \"~\" (backup files)
4) is surrounded with \"#\" (auto save files)
5) is \".git\" (see also `treemacs-hide-dot-git-directory')
6) is \".jj\" (see also `treemacs-hide-dot-jj-directory')
7) is \".\" or \"..\" (default dirs)"
  (declare (side-effect-free t) (pure t))
  (inline-letevals (file)
    (inline-quote
     (let ((last (aref ,file (1- (length ,file)))))
       (or (string-prefix-p ".#" ,file)
           (and (eq ?# last) (eq ?# (aref ,file 0)))
           (backup-file-name-p ,file)
           (string-equal ,file ".")
           (string-equal ,file "..")
           (and treemacs-hide-dot-git-directory
                (string-equal ,file ".git"))
           (and treemacs-hide-dot-jj-directory
                (string-equal ,file ".jj"))
           (string-prefix-p "flycheck_" ,file))))))