@@ -1306,21 +1306,22 @@ Pre-load Projectile with projects in my usual code directories.
13061306 ;; doom overrides projectile-switch-project-action for its workspace behavior,
13071307 ;; so rather than update that, set the workspaces switch project function.
13081308 (setq +workspaces-switch-project-function #'magit-status)
1309- (let ((project-directories (-filter #'f-directory?
1310- '("~/code"
1311- "~/git"))))
1312- (-map
1313- (lambda (directory)
1314- (-map (lambda (project)
1315- (-> (concat project "/") ;; Projectile likes trailing slashes
1316- (projectile-add-known-project)))
1317- (-filter (lambda (f) (and (not (s-ends-with? "." f))
1318- (f-directory? f)))
1319- (-map (lambda (f) (concat directory "/" f))
1320- (directory-files directory)))))
1321- project-directories))
1322-
1323- (projectile-cleanup-known-projects))
1309+
1310+ (defvar my/projectile-projects-cache (concat doom-cache-dir "my-projects"))
1311+ (defun my/projectile-add-known-projects ()
1312+ (interactive)
1313+ (->> (-filter #'f-directory? '("~/code" "~/git" "~/src"))
1314+ (--map (directory-files-recursively it "^\.git$" t #'f-directory?))
1315+ (-flatten)
1316+ (-map #'f-parent)
1317+ (--map (concat it "/"))
1318+ (-map #'projectile-add-known-project)))
1319+ (unless (f-exists? my/projectile-projects-cache)
1320+ (my/projectile-add-known-projects)
1321+ (with-temp-buffer
1322+ (insert (s-join "\n" projectile-known-projects))
1323+ (write-file my/projectile-projects-cache))
1324+ (projectile-cleanup-known-projects)))
13241325#+end_src
13251326*** Jira
13261327Add some commands for interacting with Jira within org documents.
0 commit comments