From 53802be6caf4905a43d2b56a6d724b06d66d3978 Mon Sep 17 00:00:00 2001 From: mattkae Date: Tue, 7 Jun 2022 08:29:31 -0400 Subject: Installing all packages in the event that some are missing --- init.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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)) -- cgit v1.2.1