Files
.emacs.d/lisp/init-elpa.el
2026-03-15 12:56:10 +08:00

50 lines
1.4 KiB
EmacsLisp

;;; init-elpa.el
;;; -*- lexical-binding: t -*-
;; Clash 代理配置
(setq url-proxy-services
'(("http" . "127.0.0.1:7890")
("https" . "127.0.0.1:7890")
("no_proxy" . "\\(localhost\\|127\\.0\\.0\\.1\\|192\\.168\\.*\\)")))
;; 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))
;; 安装el-patch
(use-package el-patch
:straight t)
;; 从develop分支而不是main分支获取straight.el
(setq straight-repository-branch t)
;; 安装use-package
(straight-use-package 'use-package)
;; 配置 use-package
(setq use-package-always-defer t
use-package-expand-minimally t
use-package-verbose t
straight-use-package-version t
straight-use-package-by-default t)
;; 安装benchmark-init
(use-package benchmark-init
:init (benchmark-init/activate)
:hook (after-init . benchmark-init/deactivate))
(provide 'init-elpa)