Skip to content

Commit

Permalink
Add library scan after package install/uninstall
Browse files Browse the repository at this point in the history
  • Loading branch information
pkryger committed Jan 20, 2025
1 parent eace76b commit 3f3799f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions after-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,18 @@ the library and PATH is the file containing the library."
(when async-debug
(message "pk/async-locate-library-scan: docs cache updated in: %s"
(float-time (time-since t0)))))))))

(defun pk/async-locacte-library-scan-when-idle (&rest _)
"Run async library scan next time Emacs is idle for 5 seconds"
(run-with-idle-timer 5 nil #'pk/async-locate-library-scan))

:hook
(emacs-startup . (lambda ()
(run-with-idle-timer 5 nil #'pk/async-locate-library-scan))))
(emacs-startup . pk/async-locacte-library-scan-when-idle)
:config
(advice-add 'package-install :after
#'pk/async-locacte-library-scan-when-idle)
(advice-add 'package-vc-install :after
#'pk/async-locacte-library-scan-when-idle))

;; @todo remove when exordium has it
;; (use-package helm
Expand Down

0 comments on commit 3f3799f

Please sign in to comment.