summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattkae <mattkae@protonmail.com>2022-06-07 08:29:31 -0400
committermattkae <mattkae@protonmail.com>2022-06-07 08:29:31 -0400
commit53802be6caf4905a43d2b56a6d724b06d66d3978 (patch)
treeaf6e7f40f16f879974110b725b940ae304a773ed
parentbd18a38c2898548a3664a9ddab9f79c84f2caf4a (diff)
Installing all packages in the event that some are missing
-rw-r--r--init.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/init.el b/init.el
index 32f9abb..a3281e5 100644
--- a/init.el
+++ b/init.el
@@ -8,8 +8,23 @@
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
+
+;; https://stackoverflow.com/questions/31079204/emacs-package-install-script-in-init-file
(package-initialize)
+
+(setq package-list
+ '(tide auctex evil js2-highlight-vars ac-js2 js2-refactor js2-mode flycheck-irony company-irony all-the-icons req-package projectile irony org web-mode))
+
+; fetch the list of packages available
+(unless package-archive-contents
+ (package-refresh-contents))
+
+; install the missing packages
+(dolist (package package-list)
+ (unless (package-installed-p package)
+ (package-install package)))
+
;; The default is 800 kilobytes. Measured in bytes.
(setq gc-cons-threshold (* 50 1000 1000))