Switch out package.el for straight.el
This commit is contained in:
parent
3b02d38742
commit
64d4fbd29b
@ -24,28 +24,26 @@ Requires:
|
||||
(cd "~")
|
||||
#+END_SRC
|
||||
* Packages
|
||||
Set up package.el to load from ELPA and MELPA
|
||||
Use [[https://github.com/raxod502/straight.el][straight.el]] to manage packages:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(require 'package)
|
||||
(setq package-archives
|
||||
'(("gnu" . "https://elpa.gnu.org/packages/")
|
||||
("melpa" . "https://melpa.org/packages/")))
|
||||
(package-initialize)
|
||||
(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))
|
||||
#+END_SRC
|
||||
|
||||
`use-package` is a macro that simplifies installing and loading packages. `use-package-always-ensure` makes sure that all packages will be installed before loading is attempted.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(unless (package-installed-p 'use-package)
|
||||
(package-refresh-contents)
|
||||
(package-install 'use-package))
|
||||
(require 'use-package)
|
||||
(setq use-package-always-ensure t)
|
||||
#+END_SRC
|
||||
|
||||
[[https://framagit.org/steckerhalter/quelpa][Quelpa]] extends package.el to build packages from source from a bunch of targets (git, hg, etc.).
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package quelpa)
|
||||
(use-package quelpa-use-package)
|
||||
(straight-use-package 'use-package)
|
||||
(setq straight-use-package-by-default t)
|
||||
#+END_SRC
|
||||
|
||||
* Benchmarking
|
||||
@ -211,7 +209,7 @@ Use ido-mode for completion within Magit:
|
||||
** Forge
|
||||
[[https://github.com/magit/forge][Forge]] is an extension for Magit that lets it interact with code forges (e.g. GitHub).
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package forge :quelpa
|
||||
(use-package forge
|
||||
:after (magit)
|
||||
:config
|
||||
(add-to-list 'forge-alist '("git.jeremydormitzer.com" "git.jeremydormitzer.com/api/v1"
|
||||
@ -1239,7 +1237,7 @@ Display inline images after executing a source block:
|
||||
Enable async source block execution. Note: this execute the contents of the source block in a separate Emacs process, so blocks that rely on anything defined in init.org or the current Emacs process won't work as expected.
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package ob-async
|
||||
:quelpa (ob-async :fetcher github :repo "astahlman/ob-async"))
|
||||
:straight (ob-async :host github :repo "astahlman/ob-async"))
|
||||
#+END_SRC
|
||||
|
||||
** Images
|
||||
@ -1536,7 +1534,7 @@ Some formatting stuff:
|
||||
Use nvm to manage node versions:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package nvm
|
||||
:quelpa ((nvm :fetcher github :repo "rejeep/nvm.el"))
|
||||
:straight ((nvm :host github :repo "rejeep/nvm.el"))
|
||||
:commands (nvm-use nvm-use-for nvm-use-for-buffer))
|
||||
#+END_SRC
|
||||
|
||||
@ -3191,8 +3189,8 @@ becomes:
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(use-package matrix-client
|
||||
:commands matrix-client-connect
|
||||
:quelpa ((matrix-client :fetcher github :repo "alphapapa/matrix-client.el"
|
||||
:files (:defaults "logo.png" "matrix-client-standalone.el.sh"))))
|
||||
:straight ((matrix-client :host github :repo "alphapapa/matrix-client.el"
|
||||
:files (:defaults "logo.png" "matrix-client-standalone.el.sh"))))
|
||||
#+END_SRC
|
||||
|
||||
* EMMS
|
||||
@ -3271,8 +3269,8 @@ Emacs has excellent built-in SQL support.
|
||||
(use-package graphql-mode
|
||||
:mode "\\.gql\\'"
|
||||
:commands (graphql-mode org-babel-execute:graphql)
|
||||
:quelpa ((graphql-mode :fetcher github
|
||||
:repo "jdormit/graphql-mode"))
|
||||
:straight ((graphql-mode :host github
|
||||
:repo "jdormit/graphql-mode"))
|
||||
:config
|
||||
(defvar graphql-env-alist '()
|
||||
"An alist defining available GraphQL servers
|
||||
|
Loading…
Reference in New Issue
Block a user