refactor(config): Clean up and reorganize Emacs configuration

Remove unused packages (EMMS, jinx, god-mode), simplify terminal
setup with ido instead of vertico/orderless, and reorganize
keybindings. Add new packages (debase, discomfort, git-timemachine,
edit-indirect) and improve EXWM, dired, and theme
configurations. Move restart-fcitx5 to kbd-func and update Linux
PATH for Guix.
This commit is contained in:
2026-05-30 22:59:25 +08:00
parent 42c3e3600c
commit ccd5c085f8
19 changed files with 143 additions and 226 deletions

View File

@@ -53,7 +53,7 @@
:prefix "C-c f"
"r" 'consult-recent-file
"f" 'consult-fd
"g" 'consult-ripgrep-project
"g" 'consult-ripgrep
"e" 'consult-flycheck
"l" 'consult-locate
"h" 'consult-fd-home
@@ -67,7 +67,7 @@
;; t for modes toggle
(general-def
:prefix "C-c t"
"f" 'global-flycheck-mode
"f" 'flycheck-mode
"j" 'my/jinx-smart-toggle
"g" 'gptel-mode)
@@ -102,17 +102,22 @@
"n" 'emms-next
"p" 'emms-previous
"b" 'emms-browser
"s" 'emms-start
"q" 'emms-stop
"P" 'emms-pause
"S" 'emms-toggle-single-track
"l" 'switch-to-emms-playlist
"d" 'my-emms-play-directory)
"l" 'emms-playlist-mode-switch-buffer
"d" 'emms-play-directory)
;; d for dired
(general-def
:prefix "C-c d"
"a" 'dirvish-quick-access
"s" 'dirvish-side
"h" 'dirvish-history-menu)
"h" 'dirvish-history-menu
"f" 'dirvish-fd
"F" 'dirvish-fd-switches-menu
"t" 'trashed)
;; scratch buffer
(if *is-mac*
@@ -186,6 +191,11 @@
(general-def minibuffer-local-map
"C-c C-e" 'embark-export)
;; completion
(general-def completion-list-mode-map
"M-n" 'minibuffer-next-completion
"M-p" 'minibuffer-previous-completion)
;; markdown
(general-def markdown-mode-map
"M-p" nil
@@ -198,7 +208,7 @@
"C-c t l" 'org-toggle-link-display
"M-{" 'org-previous-visible-heading
"M-}" 'org-next-visible-heading
"C-," 'duplicate-and-move-to-next-line
"C-," 'crux-duplicate-current-line-or-region
"C-c o l" 'denote-link
"C-c o L" 'denote-org-link-to-heading
"C-c o b" 'denote-backlinks
@@ -227,7 +237,8 @@
;; emms
(general-def emms-playlist-mode-map
"<prior>" 'emms-previous
"<next>" 'emms-next)
"<next>" 'emms-next
"C-c C-s" 'emms-history-save)
;; perspective
(general-def persp-mode-map
@@ -235,9 +246,14 @@
"C-c p d" 'persp-kill
"C-x M-b" 'persp-ibuffer)
;; visual-line
(general-def visual-line-mode-map
"C-k" 'kill-visual-line)
;; info
(general-def Info-mode-map
"M-n" 'forward-paragraph)
;; discomfort
(general-def discomfort-mode-map
"p" 'previous-line
"P" 'discomfort-poweroff)
;; global map with C-c prefix
(general-def
@@ -253,7 +269,6 @@
"k" 'comment-line
"K" 'comment-kill
"E" 'eshell
"C-t" 'trashed
"C-s" 'consult-focus-lines)
;; global map
@@ -323,6 +338,8 @@
"C-x r b" 'consult-bookmark
"C-x p b" 'consult-project-buffer
"C-x p E" 'eat-project
"C-x p r" 'consult-ripgrep-project
"C-x p R" 'project-query-replace-regexp
"C-;" 'embark-act)
(when *is-android*