Skip to content

Instantly share code, notes, and snippets.

@dustinlacewell-wk
Last active January 14, 2018 21:33
Show Gist options
  • Save dustinlacewell-wk/fc998c56c61aceda12d8e095eab83759 to your computer and use it in GitHub Desktop.
Save dustinlacewell-wk/fc998c56c61aceda12d8e095eab83759 to your computer and use it in GitHub Desktop.

Package Management

Initialize package management

(require 'package)
(setq package-list '(use-package req-package))

(setq package-archives '(("MELPA" . "http://melpa.org/packages/")
                         ("ELPA" . "http://tromey.com/elpa/")
                         ("gnu"  . "http://elpa.gnu.org/packages/"))
      load-prefer-newer t
      package--init-file-ensured t
      package-enable-at-startup nil)

(unless (file-directory-p package-user-dir)
  (make-directory package-user-dir t))

(package-initialize)

Minimize package installation warnings

(setq byte-compile-warnings nil
      gnutls-min-prime-bits 4096)

Fetch package listing

(unless package-archive-contents
  (package-refresh-contents))

Install base packages

(setq package-list '(el-get use-package req-package))
(dolist (package package-list)
  (unless (package-installed-p package)
    (package-install package))
  (require package))

(setq use-package-always-ensure t)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment