Managing the projectile cache
SPC p i
will invalidate the project cache and remove any files changes since the cache was created or added to (when ever files are opened). Very useful when files are renamed.
SPC p D
will read the projects on the projectile-project-search-path
so should update the projects listed when using SPC p p
I use this code in the Doom config.el
file to set the Projectile search path:
;; Define a project path to discover projects using SPC p D
;; https://docs.projectile.mx/projectile/usage.html
;; (setq projectile-project-search-path '("~/projects/" "~/work/" ("~/github" . 1)))
(setq projectile-project-search-path '(("~/projects" . 2) ("~/.config" . 1)))
In this example the ~/projects
directory and its sub-directories are searched, along with the .config
directory
Disable the cache
If the projectile cache causes more challenges that value it provides, then disable the cache in the Doom config.el
file
;; Disable projectile cache - saves requirement to invalidate cache when moving files
;; (setq projectile-enable-caching nil)
Hope this helps.