Use straight.el instead of package.el to manage my packages

This commit is contained in:
Mateus Pinto Rodrigues
2019-10-14 18:14:09 -03:00
parent a713823504
commit 889003e3cb
5 changed files with 45 additions and 51 deletions

24
init.el
View File

@@ -1,4 +1,26 @@
;(package-initialize)
;; Bootstrap straight.el package manager
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; Always use straight.el to install packages with use-package
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
;; Minimal package.el use so we can explore melpa packages
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/")
'("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'load-path "~/.emacs.d/elisp/")