refactor: refine Windows support and convert use-package :if to conditionals
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user