refactor: refine Windows support and convert use-package :if to conditionals

This commit is contained in:
2026-06-13 08:25:44 +08:00
parent 5c7391dcf8
commit e3dda7fd65
8 changed files with 95 additions and 95 deletions

View File

@@ -5,7 +5,8 @@
;;; Code:
;; keycast按键广播
(use-package keycast)
(if use-package-always-defer
(use-package keycast))
;; anzu显示isearch匹配数字
(use-package anzu
@@ -35,55 +36,51 @@
(?v "Variables" font-lock-variable-name-face)))))))
;; jinx拼写检查
(use-package jinx
:if
(not *is-windows*)
:delight
(jinx-mode " Jinx" jinx)
: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)
(#x3400 . #x4DBF)
(#x3000 . #x303F)
(#xFF00 . #xFFEF)
(#x20000 . #x2A6DF)))
(let ((start (car range))
(end (cdr range)))
(dotimes (i (- end start))
(modify-syntax-entry (+ start i) "_" jinx--syntax-table))))))
(unless *is-windows*
(use-package jinx
:delight
(jinx-mode " Jinx" jinx)
: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)
(#x3400 . #x4DBF)
(#x3000 . #x303F)
(#xFF00 . #xFFEF)
(#x20000 . #x2A6DF)))
(let ((start (car range))
(end (cdr range)))
(dotimes (i (- end start))
(modify-syntax-entry (+ start i) "_" jinx--syntax-table))))))
(use-package consult-jinx
:if
(not *is-windows*)
:after jinx
:demand t
:straight nil)
(use-package consult-jinx
:after jinx
:demand t
:straight nil))
;; eat终端
(use-package eat
:if
(not *is-windows*)
: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))
(unless *is-windows*
(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)))
;; perspective工作区管理
(use-package perspective