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

67 lines
1.6 KiB
EmacsLisp
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
;;; 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-packageemacs29以上别装
;; (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
:config
(delight '((eldoc-mode nil eldoc)
(org-indent-mode nil org)
(desktop-environment-mode nil desktop-environment))))
;; 安装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