;;; init-elpa.el --- elpa config -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: ;; 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,emacs29以上别装 ;; (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) ;; delight (use-package delight :init (delight `((eldoc-mode nil eldoc) (org-indent-mode nil org-indent) (desktop-environment-mode nil desktop-environment) (hs-minor-mode nil hideshow) (rainbow-delimiters-mode ,(propertize " Rdelimiters" 'face 'rainbow-delimiters-depth-1-face) rainbow-delimiters)))) ;; gcmh,管理垃圾回收 (use-package gcmh :delight :demand t :init (setq gcmh-idle-delay 'auto gcmh-auto-idle-delay-factor 10 gcmh-high-cons-threshold #x4000000) :config (gcmh-mode 1)) ;; benchmark-init (use-package benchmark-init :init (benchmark-init/activate) :hook (after-init . benchmark-init/deactivate)) (provide 'init-elpa) ;;; init-elpa.el ends here