aboutsummaryrefslogtreecommitdiffstats
path: root/.emacs.d/modules/et-package.el
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-04-01 11:49:47 -0400
committerEugene Triguba <hello@eugenetriguba.com>2026-04-01 11:50:20 -0400
commit7aa80639f92f1c8359b5311014e2fc22831eba86 (patch)
tree188efe1520d7ef6daf208d8de50388c1a3a98238 /.emacs.d/modules/et-package.el
parentUpdate nvim config (diff)
downloaddotfiles-7aa80639f92f1c8359b5311014e2fc22831eba86.zip
Update emacs config
Diffstat (limited to '.emacs.d/modules/et-package.el')
-rw-r--r--.emacs.d/modules/et-package.el33
1 files changed, 33 insertions, 0 deletions
diff --git a/.emacs.d/modules/et-package.el b/.emacs.d/modules/et-package.el
new file mode 100644
index 0000000..230a335
--- /dev/null
+++ b/.emacs.d/modules/et-package.el
@@ -0,0 +1,33 @@
+;; First, we want to setup package.el for installing packages.
+;; This is emac's built-in package manager, and we'll use it
+;; to install use-package itself.
+;;
+;; To list the packages and see what is avaiable, we can use
+;; M-x list-packages.
+(require 'package)
+
+;; Package archives are where we want to install packages from.
+;; It is expected that we setup this variable before we call
+;; package-initialize.
+(setq package-archives '(("melpa" . "https://melpa.org/packages/")
+ ("melpa-stable" . "https://stable.melpa.org/packages/")
+ ("org" . "https://orgmode.org/elpa/")
+ ("elpa" . "https://elpa.gnu.org/packages/")))
+(package-initialize)
+
+;; If use package isn't installed on the current system,
+;; we want to build the package contents and install use-package.
+;;
+;; Do note that the package contents can get out of date, and there
+;; is no automatic process here for refreshing them. Instead, we'll
+;; need to do M-x package-refresh-contents occasionally.
+(unless (package-installed-p 'use-package)
+ (package-refresh-contents)
+ (package-install 'use-package))
+
+(require 'use-package)
+
+;; Always ensure anything used via use-package is installed.
+(setq use-package-always-ensure t)
+
+(provide 'et-package)