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:
@@ -4,10 +4,22 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; hs-minor-mode
|
||||
(add-hook 'prog-mode-hook 'hs-minor-mode)
|
||||
;; hideshow,折叠代码
|
||||
(use-package hideshow
|
||||
:hook
|
||||
(prog-mode . hs-minor-mode))
|
||||
|
||||
;; flycheck
|
||||
;; xref,查找引用
|
||||
(use-package xref
|
||||
:autoload xref-show-definitions-completing-read
|
||||
:init
|
||||
(when (executable-find "rg")
|
||||
(setq xref-search-program 'ripgrep))
|
||||
|
||||
(setq xref-show-definitions-function #'xref-show-definitions-completing-read
|
||||
xref-show-xrefs-function #'xref-show-definitions-completing-read))
|
||||
|
||||
;; flycheck,语法检查
|
||||
(use-package flycheck)
|
||||
|
||||
(use-package flycheck-guile
|
||||
@@ -15,7 +27,6 @@
|
||||
(scheme-mode . (lambda ()
|
||||
(require 'flycheck-guile))))
|
||||
|
||||
;; consult-flycheck
|
||||
(use-package consult-flycheck)
|
||||
|
||||
;; tree-sitter
|
||||
|
||||
Reference in New Issue
Block a user