From 1cc99ec36fd906777b412692570e093cbf014998 Mon Sep 17 00:00:00 2001 From: James Cherti <60946298+jamescherti@users.noreply.github.com> Date: Sun, 4 Aug 2024 21:04:33 -0400 Subject: [PATCH] Update README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 683c70a..72c4c88 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,32 @@ You can also use the [vim-tab-bar](https://github.com/jamescherti/vim-tab-bar.el (vim-tab-bar-mode 1)) ``` +### How to configure straight.el? + +[Add the straight.el bootstrap code](https://github.com/radian-software/straight.el?tab=readme-ov-file#getting-started) to `~/.emacs.d/pre-init.el`: +``` emacs-lisp +;; Users of Emacs versions >= 27 will want to set +;; package-enable-at-startup to nil +(setq package-enable-at-startup nil) + +;; Straight +(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)) +``` + ## How long does the author's Emacs configuration take to start? The author is using [minimal-emacs.d](https://github.com/jamescherti/minimal-emacs.d) as his `early-init.el` and `init.el`. He is using 152 packages.