Function: projectile--ignore-patterns
projectile--ignore-patterns is a byte-compiled function defined in
projectile.el.
Signature
(projectile--ignore-patterns &optional ROOT)
Documentation
Return ROOT's ignore rules as a list of gitignore-style patterns.
This is Projectile's single source of ignore patterns: every indexing method and every external tool Projectile drives is configured from this list, so they all apply the same rules the same way. It merges
- projectile-globally-ignored-directories, as directory-only patterns
(a trailing / is appended)
- projectile-globally-ignored-files, as-is
- projectile-globally-ignored-file-suffixes, as *SUFFIX globs
- the - (ignore) entries of the project's dirconfig, which are already
written in this language
The projectile-globally-unignored-* options cancel out the matching
entries. projectile-globally-ignored-file-regexps is deliberately not
part of this: those are Emacs regexps, not patterns, and can't be handed
to an external tool.
ROOT defaults to the current project's root and only matters for the
dirconfig entries; outside a project the global patterns are returned on
their own. See projectile--ignore-pattern-to-regexp for the matching
rules.
Source Code
;; Defined in ~/.emacs.d/elpa/projectile-20260820.1509/projectile.el
(defun projectile--ignore-patterns (&optional root)
"Return ROOT's ignore rules as a list of gitignore-style patterns.
This is Projectile's single source of ignore patterns: every indexing
method and every external tool Projectile drives is configured from this
list, so they all apply the same rules the same way. It merges
- `projectile-globally-ignored-directories', as directory-only patterns
\(a trailing `/' is appended)
- `projectile-globally-ignored-files', as-is
- `projectile-globally-ignored-file-suffixes', as `*SUFFIX' globs
- the `-' (ignore) entries of the project's dirconfig, which are already
written in this language
The `projectile-globally-unignored-*' options cancel out the matching
entries. `projectile-globally-ignored-file-regexps' is deliberately not
part of this: those are Emacs regexps, not patterns, and can't be handed
to an external tool.
ROOT defaults to the current project's root and only matters for the
dirconfig entries; outside a project the global patterns are returned on
their own. See `projectile--ignore-pattern-to-regexp' for the matching
rules."
(append
(mapcar (lambda (name) (concat (directory-file-name name) "/"))
(projectile-globally-ignored-directory-names))
(seq-difference projectile-globally-ignored-files
projectile-globally-unignored-files)
(projectile--globally-ignored-file-suffixes-glob)
(projectile--dirconfig-ignore root)))