Files
.emacs.d/lisp/init-terminal-package.el
User e2a352709c 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.
2026-05-18 20:46:26 +08:00

81 lines
1.9 KiB
EmacsLisp
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
;;; init-terminal-package.el --- major packages -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;; 安装crux增强快捷键快捷键配置在init-kbd.el中
(use-package crux)
;; 安装hungry-delete
(use-package hungry-delete)
;; 安装drag-stuff拖动字符
(use-package drag-stuff)
;; expand region
(use-package expand-region)
;; 启用savehist保存命令顺序
(use-package savehist
:init (setq enable-recursive-minibuffers t
history-length 50
savehist-additional-variables '(mark-ring
global-mark-ring
search-ring
regexp-search-ring
extended-command-history)
savehist-autosave-interval 300)
(savehist-mode))
;; saveplace保存光标位置
(use-package saveplace
:init (save-place-mode))
;; undo增强
(use-package undo-fu)
;; vertico
(use-package vertico
:init (vertico-mode t))
;; 安装orderless用于模糊搜索
(use-package orderless
:custom (completion-styles '(orderless basic)))
;; (use-package corfu-terminal
;; :init (corfu-terminal-mode))
;; scheme
(use-package geiser
:config
(with-eval-after-load 'geiser
(setq geiser-default-implementation 'guile)))
(use-package geiser-guile)
;; general
(use-package general)
;; god-mode模态编辑
(use-package god-mode
:config
(setq god-mode-enable-function-key-translation nil)
(custom-set-faces
'(god-mode-lighter ((t (:inherit straight-process-error)))))
(defun my-sync-line-numbers-with-god-mode ()
(let ((desired (if (bound-and-true-p god-local-mode)
'relative
t)))
(unless (or (eq display-line-numbers desired) (bound-and-true-p olivetti-mode))
(setq display-line-numbers desired))))
(add-hook 'post-command-hook #'my-sync-line-numbers-with-god-mode)
(setq god-exempt-major-modes
(delete-dups (append '(diff-mode exwm-mode) god-exempt-major-modes))))
(provide 'init-terminal-package)
;;; init-terminal-package.el ends here