refactor: Reorganize config with use-package and optimize startup hooks

- Split monolithic init-package.el into focused modules
- Convert eager `:init` blocks to lazy `:hook`
- Consolidate UI settings and defer theme loading.
- Remove duplicated config between GUI and terminal paths.
This commit is contained in:
2026-06-04 02:27:20 +08:00
parent 8db37d1c6d
commit b4733718d4
20 changed files with 910 additions and 849 deletions

View File

@@ -38,32 +38,8 @@
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))
;; 在imenu显示use-package
(setopt use-package-enable-imenu-support t)
(provide 'init-elpa)