Improve package and use-package configuration

This commit is contained in:
James Cherti
2024-07-02 11:56:39 -04:00
parent 3b33ddb158
commit 372dc58018
2 changed files with 8 additions and 7 deletions

View File

@@ -248,6 +248,11 @@
;; loaded, but after `early-init-file'. ;; loaded, but after `early-init-file'.
(setq package-enable-at-startup t) (setq package-enable-at-startup t)
(setq package-quickstart nil)
;; Always ensure packages are installed
(setq use-package-always-ensure t)
;;; Load post-early-init.el ;;; Load post-early-init.el
(minimal-emacs-load-user-init "post-early-init.el") (minimal-emacs-load-user-init "post-early-init.el")

10
init.el
View File

@@ -14,12 +14,13 @@
;;; Code: ;;; Code:
;;; Load pre-init.el (after package/use-package and before init)
(minimal-emacs-load-user-init "pre-init.el")
;;; package.el ;;; package.el
(require 'package) (require 'package)
(setq package-quickstart nil)
(when (version< emacs-version "28") (when (version< emacs-version "28")
(add-to-list 'package-archives (add-to-list 'package-archives
'("nongnu" . "https://elpa.nongnu.org/nongnu/"))) '("nongnu" . "https://elpa.nongnu.org/nongnu/")))
@@ -52,11 +53,6 @@
(eval-when-compile (eval-when-compile
(require 'use-package)) (require 'use-package))
;; Always ensure packages are installed
(setq use-package-always-ensure t)
;;; Load pre-init.el (after package/use-package and before init)
(minimal-emacs-load-user-init "pre-init.el")
;;; Load auto-compile and gcmh ;;; Load auto-compile and gcmh
(use-package auto-compile (use-package auto-compile