feat!(cli): load project .doomrc instead of ci.el
BREAKING CHANGE: Before, 'doom ci' would load $GIT_WORKING_TREE/.github/ci.el, to give users/projects an opportunity to provide project-local configuration for bin/doom (mainly for CI/CD). Now, this ci.el file is no longer loaded and instead, *all* bin/doom sessions will walk up the file tree and load the first .doomrc it finds. This gives bin/doom users a more general place configure all of its commands, and not just 'doom ci' commands. Extras: - Adds .doomrc to auto-mode-alist (so that it starts in emacs-lisp-mode).
This commit is contained in:
parent
422baedad7
commit
9b8ed397e8
4 changed files with 18 additions and 20 deletions
16
bin/doom
16
bin/doom
|
@ -198,8 +198,8 @@ SEE ALSO:
|
|||
silently fail on missing files, but --strict-load won't.
|
||||
|
||||
Warning: files loaded this way load too late to define new commands. To
|
||||
define commands, do so from `$DOOMDIR'/cli.el or `$DOOMDIR'/init.el
|
||||
instead."
|
||||
define commands, do so from `$DOOMDIR'/cli.el, `$DOOMDIR'/init.el, or a
|
||||
.doomrc file in the current project tree."
|
||||
(when color?
|
||||
(setq doom-print-backend (if (eq color? :yes) 'ansi)))
|
||||
(when pager
|
||||
|
@ -299,7 +299,17 @@ SEE ALSO:
|
|||
(load! cli-file path t)))))
|
||||
|
||||
(doom-log "Loading $DOOMDIR/cli.el")
|
||||
(load! cli-file doom-private-dir t))))
|
||||
(load! cli-file doom-private-dir t))
|
||||
|
||||
;; Allow per-project Doom settings in .doom files.
|
||||
(let (doomrc)
|
||||
(cond
|
||||
((setq doomrc (getenv "DOOMRC"))
|
||||
(load! doomrc))
|
||||
((setq doomrc (locate-dominating-file default-directory ".doomrc"))
|
||||
(load! ".doomrc" doomrc)))
|
||||
(when doomrc
|
||||
(print! "Loaded doomrc: %s" doomrc)))))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue