;;; init-package.el --- some other packages -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: ;; keycast,按键广播 (if use-package-always-defer (use-package keycast)) ;; anzu,显示isearch匹配数字 (use-package anzu :delight :hook (after-init . global-anzu-mode)) ;; wgrep,writable grep (use-package wgrep) ;; ripgrep (use-package rg) ;; hydra (use-package hydra :defines (consult-imenu-config) :init (with-eval-after-load 'consult-imenu (setq consult-imenu-config '((emacs-lisp-mode :toplevel "Functions" :types ((?f "Functions" font-lock-function-name-face) (?h "Hydras" font-lock-constant-face) (?m "Macros" font-lock-function-name-face) (?p "Packages" font-lock-constant-face) (?t "Types" font-lock-type-face) (?v "Variables" font-lock-variable-name-face))))))) ;; jinx,拼写检查 (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 :after jinx :demand t :straight nil)) ;; eat,终端 (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 :bind ("C-x M-b" . persp-list-buffers) :custom (persp-mode-prefix-key (kbd "C-c p")) :hook (after-init . persp-mode) :config (setq persp-switch-to-buffer-behavior 'switch) (with-eval-after-load 'consult (consult-customize consult-source-buffer :hidden t :default nil) (add-to-list 'consult-buffer-sources persp-consult-source)) (setq switch-to-prev-buffer-skip (lambda (win buff bury-or-kill) (or (not (persp-is-current-buffer buff)) (cl-some (lambda (re) (string-match-p re (buffer-name buff))) consult-buffer-filter)))) (setq persp-initial-frame-name "main")) ;; magit (use-package magit :config (setq magit-bind-magit-project-status nil magit-diff-refine-hunk 'all)) ;; git-timemachine (use-package git-timemachine) ;; ediff (use-package ediff :config (setq ediff-window-setup-function 'ediff-setup-windows-plain ediff-split-window-function 'split-window-horizontally)) ;; project (use-package project :config (setq project-switch-commands (assq-delete-all 'project-vc-dir project-switch-commands)) (setq project-switch-commands (seq-uniq (append project-switch-commands '((magit-project-status "Magit" ?v) (eat-project "Eat" ?E) (project-query-replace-regexp "Query Replace" ?R) (consult-ripgrep-project "Ripgrep" ?r)))))) ;; emms (use-package emms :commands (emms-playlist-mode-switch-buffer) :config (emms-all) (setq emms-player-list '(emms-player-vlc) emms-info-functions '(emms-info-native)) (emms-history-load)) ;; tokei (use-package tokei) ;; helpful (use-package helpful :bind (([remap describe-function] . helpful-callable) ([remap describe-command] . helpful-command) ([remap describe-variable] . helpful-variable) ([remap describe-key] . helpful-key) ([remap describe-symbol] . helpful-symbol) :map emacs-lisp-mode-map ("C-c C-d C-d" . helpful-at-point) :map lisp-interaction-mode-map ("C-c C-d C-d" . helpful-at-point) :map helpful-mode-map ("C-x K" . helpful-kill-buffers) ("r" . remove-hook-at-point))) ;; typit,打字游戏 (use-package typit) ;; power-mode (use-package power-mode) ;; guix (if *is-linux* (use-package guix)) (provide 'init-package) ;;; init-package.el ends here