70 lines
1.9 KiB
EmacsLisp
70 lines
1.9 KiB
EmacsLisp
;;; init-elpa.el --- elpa config -*- lexical-binding: t -*-
|
|
|
|
;;; Commentary:
|
|
|
|
;;; Code:
|
|
|
|
;; Clash 代理配置
|
|
;; (if *is-linux*
|
|
;; (progn
|
|
;; (setq url-proxy-services
|
|
;; '(("http" . "192.168.31.121:7890")
|
|
;; ("https" . "192.168.31.121:7890")
|
|
;; ("no_proxy" . "\\(localhost\\|127\\.0\\.0\\.1\\|192\\.168\\.*\\)")))
|
|
|
|
;; (setenv "http_proxy" "192.168.31.121:7890")
|
|
;; (setenv "https_proxy" "192.168.31.121:7890"))
|
|
|
|
(progn
|
|
(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\\.*\\)")))
|
|
|
|
(setenv "http_proxy" "127.0.0.1:7890")
|
|
(setenv "https_proxy" "127.0.0.1:7890"))
|
|
;; )
|
|
|
|
;; 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)
|
|
|
|
;;; init-elpa.el ends here
|