aboutsummaryrefslogtreecommitdiff
path: root/projectile.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.dev>2025-02-03 11:15:02 +0200
committerBozhidar Batsov <bozhidar@batsov.dev>2025-02-03 11:15:02 +0200
commite6c0f5f236b2e60fcf7f8d090fb3e2af0096d4ff (patch)
treeaf7f7e01e8e91070c6a7416b2c1669c7c05a4fd7 /projectile.el
parent9979f835e818fe2389cc97f2694fedcd174d1c41 (diff)
Introduce projectile-auto-cleanup-known-projects
Diffstat (limited to 'projectile.el')
-rw-r--r--projectile.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/projectile.el b/projectile.el
index 52b3a80..1962fb0 100644
--- a/projectile.el
+++ b/projectile.el
@@ -194,6 +194,14 @@ See also `projectile-project-search-path'."
:type 'boolean
:package-version '(projectile . "2.3.0"))
+(defcustom projectile-auto-cleanup-known-projects nil
+ "Whether to cleanup projects when project switching commands are invoked.
+
+See also `projectile-cleanup-known-projects'."
+ :group 'projectile
+ :type 'boolean
+ :package-version '(projectile . "2.9.0"))
+
(defcustom projectile-auto-update-cache t
"Whether cache is automatically updated when files are opened or deleted."
:group 'projectile
@@ -5547,6 +5555,8 @@ and discover new ones if `projectile-auto-discover' is enabled."
;; load the known projects
(unless projectile-known-projects
(projectile-load-known-projects))
+ (when projectile-auto-cleanup-known-projects
+ (projectile--cleanup-known-projects))
(when (and projectile-auto-discover projectile-project-search-path)
(projectile-discover-projects-in-search-path)))