Use elpaca instead of straight
Some big changes related to that, and to use-package
This commit is contained in:
parent
ecf3d4195a
commit
c7b0c1c6c2
50 changed files with 1262 additions and 365 deletions
|
|
@ -14,21 +14,55 @@
|
|||
(setq gc-cons-threshold 500000000)
|
||||
(setq gc-cons-percentage 0.6)
|
||||
|
||||
;;; Use straight.el for package management
|
||||
(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))
|
||||
;;; Use elpaca for package management.
|
||||
(defvar elpaca-installer-version 0.7)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil :depth 1
|
||||
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
||||
,@(when-let ((depth (plist-get order :depth)))
|
||||
(list (format "--depth=%d" depth) "--no-single-branch"))
|
||||
,(plist-get order :repo) ,repo))))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
(straight-use-package 'use-package)
|
||||
(elpaca elpaca-use-package
|
||||
;; Enable use-package :ensure support for Elpaca.
|
||||
(elpaca-use-package-mode))
|
||||
|
||||
|
||||
(defun icejam-elpaca-write-lock ()
|
||||
"Write elpaca lock file."
|
||||
(interactive)
|
||||
(elpaca-write-lockfile (concat user-emacs-directory "elpaca.lock")))
|
||||
|
||||
;; I don't know why this needs to be here and with a lisp directory, but
|
||||
;; normal subdirs.el file doesn't work.
|
||||
|
|
@ -57,14 +91,14 @@
|
|||
(require 'icejam-vundo)
|
||||
(require 'icejam-speed-type)
|
||||
|
||||
;; Themes
|
||||
;; ;; Themes
|
||||
(require 'icejam-themes)
|
||||
(require 'icejam-fonts)
|
||||
|
||||
;; Actual supported languages and file syntax.
|
||||
;; ;; Actual supported languages and file syntax.
|
||||
(require 'icejam-lang-clang)
|
||||
(require 'icejam-lang-clojure)
|
||||
(require 'icejam-lang-common-lisp)
|
||||
;; ;; (require 'icejam-lang-common-lisp)
|
||||
(require 'icejam-lang-dart)
|
||||
(require 'icejam-lang-dhall)
|
||||
(require 'icejam-lang-elisp)
|
||||
|
|
@ -89,7 +123,7 @@
|
|||
(require 'icejam-lang-web)
|
||||
(require 'icejam-lang-ziglang)
|
||||
|
||||
;; Diminish modeline litter
|
||||
;; ;; Diminish modeline litter
|
||||
(require 'icejam-diminish)
|
||||
|
||||
;; Restore GC to normal, but still high
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue