chore(config): Refactor Emacs config for cross-platform compatibility
Add Android/Termux support with `*is-android*` constant and conditional GUI/terminal initialization. Remove maximized frame defaults and custom.el. Replace corfu with corfu-terminal in TTY. Add god-mode to terminal config with line number sync. Update org agenda to use org-ql blocks with super-agenda grouping. Switch solarized-theme to fork. Clean up redundant functions and unify keyboard bindings across environments.
This commit is contained in:
@@ -24,36 +24,41 @@
|
||||
completion-at-point-functions))))))
|
||||
|
||||
;; corfu
|
||||
(use-package corfu
|
||||
:autoload
|
||||
(corfu-quit consult-completion-in-region)
|
||||
:functions
|
||||
(persistent-scratch-save)
|
||||
:custom
|
||||
(corfu-auto t)
|
||||
(corfu-auto-prefix 2)
|
||||
(corfu-count 12)
|
||||
(corfu-preview-current nil)
|
||||
(corfu-on-exact-match nil)
|
||||
(corfu-auto-delay 0.2)
|
||||
(corfu-popupinfo-delay '(0.4 . 0.2))
|
||||
(global-corfu-modes '((not erc-mode
|
||||
circe-mode
|
||||
help-mode
|
||||
gud-mode
|
||||
vterm-mode)
|
||||
t))
|
||||
:init
|
||||
(global-corfu-mode)
|
||||
(corfu-popupinfo-mode)
|
||||
(corfu-history-mode)
|
||||
:config
|
||||
;;Quit completion before saving
|
||||
(add-hook 'before-save-hook #'corfu-quit)
|
||||
(advice-add #'persistent-scratch-save :before #'corfu-quit)
|
||||
:bind
|
||||
(:map corfu-map
|
||||
("RET" . nil)))
|
||||
(if (display-graphic-p)
|
||||
(use-package corfu
|
||||
:autoload
|
||||
(corfu-quit consult-completion-in-region)
|
||||
:functions
|
||||
(persistent-scratch-save)
|
||||
:custom
|
||||
(corfu-auto t)
|
||||
(corfu-auto-prefix 2)
|
||||
(corfu-count 12)
|
||||
(corfu-preview-current nil)
|
||||
(corfu-on-exact-match nil)
|
||||
(corfu-auto-delay 0.2)
|
||||
(corfu-popupinfo-delay '(0.4 . 0.2))
|
||||
(global-corfu-modes '((not erc-mode
|
||||
circe-mode
|
||||
help-mode
|
||||
gud-mode
|
||||
vterm-mode)
|
||||
t))
|
||||
:init
|
||||
(global-corfu-mode)
|
||||
(corfu-popupinfo-mode)
|
||||
(corfu-history-mode)
|
||||
:config
|
||||
;;Quit completion before saving
|
||||
(add-hook 'before-save-hook #'corfu-quit)
|
||||
(advice-add #'persistent-scratch-save :before #'corfu-quit)
|
||||
:bind
|
||||
(:map corfu-map
|
||||
("RET" . nil)))
|
||||
|
||||
(use-package corfu-terminal
|
||||
:init
|
||||
(corfu-terminal-mode)))
|
||||
|
||||
;; 在eshell中使用tab打开补全
|
||||
(add-hook 'eshell-mode-hook
|
||||
|
||||
Reference in New Issue
Block a user