tweak(cli): add lisp/cli to doom-cli-load-path by default

This commit is contained in:
Henrik Lissner 2022-09-07 11:38:36 +02:00
parent 2cd8f85bac
commit 18887163f9
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
2 changed files with 4 additions and 6 deletions

View file

@ -236,12 +236,9 @@ SEE ALSO:
;; can do so in .doomrc or .doomproject. ;; can do so in .doomrc or .doomproject.
(load! doom-module-init-file doom-user-dir t) (load! doom-module-init-file doom-user-dir t)
;; There are a lot of CLIs, and some have expensive initialization, so best we
;; load them lazily.
(let ((dir (doom-path doom-core-dir "cli"))) (let ((dir (doom-path doom-core-dir "cli")))
;; It'd be simple to just load these files directly, but because there could
;; be a lot of them (and some of them have expensive dependencies), I use
;; `defautoload!' to load them lazily.
(add-to-list 'doom-cli-load-path dir)
;; Library for generating autoloads files for Doom modules & packages. ;; Library for generating autoloads files for Doom modules & packages.
(load! "autoloads" dir) (load! "autoloads" dir)

View file

@ -84,7 +84,8 @@
;;; Variables ;;; Variables
(defvar doom-cli-load-path (defvar doom-cli-load-path
(ignore-errors (split-string (getenv "DOOMPATH") path-separator)) (append (ignore-errors (split-string (getenv "DOOMPATH") path-separator))
(list (doom-path (file-name-directory load-file-name) "cli")))
"A list of paths to search for autoloaded CLIs on.") "A list of paths to search for autoloaded CLIs on.")
(defvar doom-cli-argument-types (defvar doom-cli-argument-types