This commit is contained in:
Zelong Kuang
2026-02-28 19:27:53 +11:00
parent e68df92a55
commit 4e569a2831
8 changed files with 33 additions and 13 deletions

View File

@@ -45,9 +45,10 @@
:ensure nil
:hook (elpaca-after-init . show-paren-mode))
(setq-default show-trailing-whitespace t)
;; Show trailing whitespace only in prog-mode and text-mode
(add-hook 'prog-mode-hook (lambda () (setq show-trailing-whitespace t)))
(add-hook 'text-mode-hook (lambda () (setq show-trailing-whitespace t)))
(recentf-mode 1)
(use-package recentf
:ensure nil
:hook (elpaca-after-init . recentf-mode)
@@ -129,7 +130,7 @@
(lambda (button)
(helpful-variable (button-get button 'apropos-symbol))))))))
(setq auto-save-default nil)
(setq-default auto-save-default nil)
;; (setq auto-save-file-name-transforms
;; `((".*" ,(concat user-emacs-directory "auto-save/") t)))

View File

@@ -15,16 +15,16 @@
;; ("terminfo/65" "terminfo/65/*")
;; ("integration" "integration/*")
;; (:exclude ".dir-locals.el" "*-tests.el")))
;; :config
;; :config
;; )
(use-package vterm)
(use-package vterm-toggle
:bind ("C-\\" . vterm-toggle)
:bind ("C-`" . vterm-toggle)
:config
(define-key vterm-mode-map (kbd "C-\\") #'vterm-toggle))
(define-key vterm-mode-map (kbd "C-`") #'vterm-toggle))
(use-package editorconfig
:diminish

View File

@@ -22,13 +22,13 @@
;; whitespace in between, e.g. ()()(). Insert whitespace if
;; genuinely want to start a new form in the middle of a word.
:unless '(sp-point-before-word-p sp-point-before-same-p)))
(sp-local-pair sp-lisp-modes "(" ")" :unless '(:rem sp-point-before-same-p))
;; Don't do square-bracket space-expansion where it doesn't make sense to
(sp-local-pair '(emacs-lisp-mode org-mode markdown-mode markdown-ts-mode gfm-mode)
"[" nil :post-handlers '(:rem ("| " "SPC")))
;; resolve conflict with hungry-delete
(defadvice hungry-delete-backward (before sp-delete-pair-advice activate) (save-match-data (sp-delete-pair (ad-get-arg 0)))))
@@ -43,7 +43,7 @@
:init (setq hungry-delete-chars-to-skip " \t\f\v"
hungry-delete-except-modes
'(help-mode minibuffer-mode minibuffer-inactive-mode calc-mode)))
(use-package abbrev
:diminish
:ensure nil
@@ -105,6 +105,10 @@
:bind ("C-x u" . vundo)
:config (setq vundo-glyph-alist vundo-unicode-symbols))
;; Remember undo history
(use-package undo-fu-session
:hook (elpaca-after-init . undo-fu-session-global-mode))
(use-package olivetti
:hook org-mode
:custom

9
lisp/init-input.el Normal file
View File

@@ -0,0 +1,9 @@
;; -*- lexical-binding: t;-*-
(use-package rime
:custom
(default-input-method "rime")
(rime-librime-root "/opt/homebrew")
(rime-emacs-module-header-root "~/build-emacs-for-macos/builds/Emacs.app/Contents/Resources/include/"))
(provide 'init-input)

View File

@@ -28,14 +28,12 @@
(mapc #'disable-theme custom-enabled-themes)
(defun doric-load-random ()
(interactive)
(let* ((themes '(doric-plum
doric-fire
(let* ((themes '(doric-fire
doric-oak
doric-jade
doric-wind
doric-beach
doric-earth
doric-water
doric-valley))
(loaded (seq-random-elt themes)))
(load-theme loaded :no-confirm)))