Config: switch consult-notes to fork version, add delight to clean mode-line, tidy package configs

This commit is contained in:
User
2026-05-09 16:55:32 +08:00
parent f419304684
commit 5ee06f8500
5 changed files with 137 additions and 102 deletions

View File

@@ -6,22 +6,20 @@
(setopt use-package-enable-imenu-support t)
;; 安装gcmh用于管理内存回收
(use-package gcmh
:demand t
:init
(setq gcmh-idle-delay 'auto
gcmh-auto-idle-delay-factor 10
gcmh-high-cons-threshold #x4000000)
:config
(gcmh-mode 1))
;; restart-emacs
(use-package restart-emacs)
;; async
(use-package async
:init
(dired-async-mode)
(async-bytecomp-package-mode 1)
(setq async-bytecomp-allowed-packages '(all)))
;; 安装multiple-cursors
(use-package multiple-cursors
:config (setq mc/insert-numbers-default 1))
:config
(setq mc/insert-numbers-default 1))
;; 安装crux增强快捷键快捷键配置在init-kbd.el中
(use-package crux)
@@ -34,6 +32,7 @@
;; 安装which-key快捷键提示
(use-package which-key
:delight
:defer 0
:config
(which-key-mode))
@@ -43,20 +42,22 @@
;; 安装vertico
(use-package vertico
:init (vertico-mode))
:init
(vertico-mode))
;; 安装orderless用于模糊搜索
(use-package orderless
:custom (completion-styles '(orderless basic)))
:custom
(completion-styles '(orderless basic)))
;; 安装marginalia用于命令注释
(use-package marginalia
:init (marginalia-mode))
:init
(marginalia-mode))
;; 安装consult增强搜索和其他菜单
(use-package consult
:config
;; everything
(when *is-windows*
(setq consult-locate-args (encode-coding-string "es.exe -i -p -r" 'gbk))
@@ -75,7 +76,8 @@
;; embark
(use-package embark
:config (setq prefix-help-command 'embark-prefix-help-command)
:config
(setq prefix-help-command 'embark-prefix-help-command)
:init
(defun my/embark-preview ()
"Previews candidate in vertico buffer, unless it's a consult command."
@@ -141,44 +143,58 @@ targets."
;; wgrep
(use-package wgrep)
;; anzu
(use-package anzu
:delight
:init
(global-anzu-mode))
;; 启用savehist保存命令顺序
(use-package savehist
:init (setq enable-recursive-minibuffers t
history-length 50
savehist-additional-variables '(mark-ring
global-mark-ring
search-ring
regexp-search-ring
extended-command-history)
savehist-autosave-interval 300)
:init
(setq enable-recursive-minibuffers t
history-length 50
savehist-additional-variables '(mark-ring
global-mark-ring
search-ring
regexp-search-ring
extended-command-history)
savehist-autosave-interval 300)
(savehist-mode))
;; saveplace保存光标位置
(use-package saveplace
:init (save-place-mode))
:init
(save-place-mode))
;; undo增强
(use-package undo-fu)
(use-package undo-fu-session
:init (undo-fu-session-global-mode))
:init
(undo-fu-session-global-mode))
;; vundo撤回树
(use-package vundo
:init (setq undo-limit 800000
undo-strong-limit 1200000
undo-outer-limit 12000000))
:init
(setq undo-limit 800000
undo-strong-limit 1200000
undo-outer-limit 12000000))
;; expand-region快速展开选中
(use-package expand-region)
;; projectile
(use-package projectile
:init (projectile-mode)
:bind (:map projectile-mode-map
("C-x p" . projectile-command-map)
("C-x p b" . consult-project-buffer))
:config (setq projectile-enable-caching t))
:delight
:init
(projectile-mode)
:bind
(:map projectile-mode-map
("C-x p" . projectile-command-map)
("C-x p b" . consult-project-buffer))
:config
(setq projectile-enable-caching t))
(use-package ibuffer-projectile
:init (add-hook 'ibuffer-hook
@@ -189,19 +205,27 @@ targets."
;; avy中文支持
(use-package ace-pinyin
:init (ace-pinyin-global-mode +1))
:delight
:init
(ace-pinyin-global-mode +1))
;; avy-zap
(use-package avy-zap
:bind (("M-z" . avy-zap-to-char-dwim)
("M-Z" . avy-zap-up-to-char-dwim)))
:bind
(("M-z" . avy-zap-to-char-dwim)
("M-Z" . avy-zap-up-to-char-dwim)))
;; jinx拼写检查
(unless *is-windows*
(use-package jinx
:hook (org-mode-hook . jinx-mode)
:bind ([remap ispell-word] . jinx-correct)
:config (setq jinx-languages "en_US")
:delight
(jinx-mode " Jinx" jinx)
:hook
(org-mode-hook . jinx-mode)
:bind
([remap ispell-word] . jinx-correct)
:config
(setq jinx-languages "en_US")
(add-to-list 'jinx-exclude-regexps '(t "\\cc"))
(with-eval-after-load 'jinx
(dolist (range '((#x4E00 . #x9FFF)
@@ -219,8 +243,9 @@ targets."
(use-package flycheck)
(use-package flycheck-guile
:hook (scheme-mode . (lambda ()
(require 'flycheck-guile))))
:hook
(scheme-mode . (lambda ()
(require 'flycheck-guile))))
;; consult-flycheck
(use-package consult-flycheck)
@@ -231,27 +256,31 @@ targets."
;; eat
(use-package eat
:straight (eat :type git
:host codeberg
:repo "akib/emacs-eat"
:files ("*.el"
("term" "term/*.el")
"*.texi"
"*.ti"
("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el")))
:hook ((eshell-load . eat-eshell-mode)
(eshell-load . eat-eshell-visual-command-mode))
:config (setq eat-term-terminfo-directory eat--terminfo-path))
:straight
(eat :type git
:host codeberg
:repo "akib/emacs-eat"
:files ("*.el"
("term" "term/*.el")
"*.texi"
"*.ti"
("terminfo/e" "terminfo/e/*")
("terminfo/65" "terminfo/65/*")
("integration" "integration/*")
(:exclude ".dir-locals.el" "*-tests.el")))
:hook
((eshell-load . eat-eshell-mode)
(eshell-load . eat-eshell-visual-command-mode))
:config
(setq eat-term-terminfo-directory eat--terminfo-path))
;; general
(use-package general)
;; hydra
(use-package hydra
:defines (consult-imenu-config)
:defines
(consult-imenu-config)
:init
(with-eval-after-load 'consult-imenu
(setq consult-imenu-config