42 lines
1.3 KiB
EmacsLisp
42 lines
1.3 KiB
EmacsLisp
;; -*- lexical-binding: t; -*-
|
|
|
|
(message "Reached package setup")
|
|
|
|
(require `package)
|
|
|
|
(setq package-archives `(("mepla" . "https://melpa.org/packages/")
|
|
("org" . "https://orgmode.org/elpa/")
|
|
("elpa" . "https://elpa.gnu.org/packages/")))
|
|
|
|
(package-initialize)
|
|
|
|
(unless (package-installed-p 'use-package)
|
|
(progn
|
|
(package-refresh-contents)
|
|
(package-install 'use-package)))
|
|
|
|
(require 'use-package)
|
|
(setq use-package-always-ensure t)
|
|
|
|
;; TODO add better detection to this
|
|
(when (eq system-type 'windows-nt)
|
|
(message "setting up straight.el")
|
|
(defvar bootstrap-version)
|
|
(let ((bootstrap-file
|
|
(expand-file-name
|
|
"straight/repos/straight.el/bootstrap.el"
|
|
(or (bound-and-true-p straight-base-dir)
|
|
user-emacs-directory)))
|
|
(bootstrap-version 7))
|
|
(unless (file-exists-p bootstrap-file)
|
|
(with-current-buffer
|
|
(url-retrieve-synchronously
|
|
"https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
|
|
'silent 'inhibit-cookies)
|
|
(goto-char (point-max))
|
|
(eval-print-last-sexp)))
|
|
(load bootstrap-file nil 'nomessage))
|
|
(setq straight-use-package-by-default t))
|
|
|
|
(provide 'sk-package)
|