Skip to content

Commit

Permalink
feat(core): add an option to load all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jan 31, 2024
1 parent fd128f6 commit 4cbdf1e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/scripts/minemacs-all.d/modules.el

This file was deleted.

4 changes: 4 additions & 0 deletions core/me-vars.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ environment variable \"$MINEMACS_IGNORE_USER_CONFIG\".")
(or minemacs-always-demand-p (daemonp) (and (getenv "MINEMACS_NOT_LAZY") t))
"Load lazy packages (minemacs-lazy-hook) immediately.")

(defconst minemacs-load-all-modules-p
(and (getenv "MINEMACS_LOAD_ALL_MODULES") t)
"Force loading all MinEmacs modules.")

(defcustom minemacs-msg-level
(let ((level (string-to-number (or (getenv "MINEMACS_MSG_LEVEL") ""))))
(cond (minemacs-verbose-p 4)
Expand Down
6 changes: 6 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ goes idle."
(+load minemacs-core-dir "me-modules.el")
(+load-user-configs 'modules 'local/modules))

;; When the MINEMACS_LOAD_ALL_MODULES environment variable is set, we force
;; loading all modules.
(when minemacs-load-all-modules-p
(setq minemacs-core-modules '(me-splash me-keybindings me-evil me-core-ui me-completion)
minemacs-modules (mapcar #'intern (mapcar #'file-name-sans-extension (directory-files minemacs-modules-dir nil "\\.el\\'")))))

;; NOTE: Ensure the `me-gc' module is in the core modules list. This module
;; enables the `gcmh-mode' package (a.k.a. the Garbage Collector Magic Hack).
;; This GCMH minimizes GC interference with the activity by using a high GC
Expand Down

0 comments on commit 4cbdf1e

Please sign in to comment.