Files
.emacs.d/lisp/init-elpa.el

52 lines
1.3 KiB
EmacsLisp

;;; init-elpa.el --- package manager -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;; straight.el
;; 使用ssh
(setq straight-vc-git-default-protocol 'ssh)
(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))
;; el-patch
(use-package el-patch
:straight t)
;; 从develop分支而不是main分支获取straight.el
(setq straight-repository-branch t)
;; 安装use-package
(if (< emacs-major-version 29)
(straight-use-package 'use-package))
;; 配置 use-package
(setq use-package-always-defer (if *is-windows* nil t)
use-package-expand-minimally t
use-package-verbose t
straight-use-package-version t
straight-use-package-by-default t)
;; 在imenu显示use-package
(setopt use-package-enable-imenu-support t)
(provide 'init-elpa)
;;; init-elpa.el ends here