This commit is contained in:
Zelong Kuang
2025-12-16 08:23:57 +11:00
parent 1c47483c1c
commit cf25aae545
8 changed files with 43 additions and 5 deletions

1
.gitignore vendored
View File

@@ -6,6 +6,7 @@
/recentf /recentf
/org-roam.db /org-roam.db
/projects /projects
/bookmarks
*~ *~
*.*~ *.*~

View File

@@ -25,8 +25,19 @@
(setq make-backup-files nil) (setq make-backup-files nil)
(setq use-short-answers t) (setq use-short-answers t)
(setq frame-title-format "Emacs: %b") (setq frame-title-format "Emacs: %b")
(setq visible-bell 1) (setq visible-bell 1)
(setq-default delete-by-moving-to-trash t
x-stretch-cursor t
window-combination-resize t)
(global-subword-mode 1)
(setq undo-limit 80000000
auto-save-default t
password-cache-expiry nil)
(setq custom-file (expand-file-name "~/.emacs.d/custom.el")) (setq custom-file (expand-file-name "~/.emacs.d/custom.el"))
(add-hook 'elpaca-after-init-hook (lambda () (load custom-file 'no-error 'no-message))) (add-hook 'elpaca-after-init-hook (lambda () (load custom-file 'no-error 'no-message)))

View File

@@ -47,4 +47,6 @@
:config :config
(treesit-auto-add-to-auto-mode-alist 'all)) (treesit-auto-add-to-auto-mode-alist 'all))
(use-package systemd)
(provide 'init-coding) (provide 'init-coding)

View File

@@ -234,7 +234,7 @@
:autoload (cape-wrap-silent) :autoload (cape-wrap-silent)
:init :init
;; Add `completion-at-point-functions', used by `completion-at-point'. ;; Add `completion-at-point-functions', used by `completion-at-point'.
;; (add-to-list 'completion-at-point-functions #'cape-dabbrev) (add-to-list 'completion-at-point-functions #'cape-dabbrev)
(add-to-list 'completion-at-point-functions #'cape-file) (add-to-list 'completion-at-point-functions #'cape-file)
(add-to-list 'completion-at-point-functions #'cape-elisp-block) (add-to-list 'completion-at-point-functions #'cape-elisp-block)
(add-to-list 'completion-at-point-functions #'cape-keyword) (add-to-list 'completion-at-point-functions #'cape-keyword)

View File

@@ -38,5 +38,8 @@
(let ((yas-buffer-local-condition ''(require-snippet-condition . auto))) (let ((yas-buffer-local-condition ''(require-snippet-condition . auto)))
(yas-expand))))) (yas-expand)))))
(setq-default abbrev-mode t)
(setq abbrev-file-name (expand-file-name "abbrev.el" user-emacs-directory))
(provide 'init-edit) (provide 'init-edit)

View File

@@ -7,6 +7,7 @@
:config :config
(setq gptel-model 'claude-sonnet-4.5) (setq gptel-model 'claude-sonnet-4.5)
(setq gptel-backend (gptel-make-gh-copilot "Copilot")) (setq gptel-backend (gptel-make-gh-copilot "Copilot"))
(setq gptel-default-mode #'org-mode)
(setq gptel-display-buffer-action nil) ; if user changes this, popup manager will bow out (setq gptel-display-buffer-action nil) ; if user changes this, popup manager will bow out
) )

View File

@@ -11,14 +11,12 @@
:branch "dev") :branch "dev")
:hook (org-mode . org-indent-mode) :hook (org-mode . org-indent-mode)
:hook (org-mode . org-cdlatex-mode) :hook (org-mode . org-cdlatex-mode)
:hook (org-mode . visual-line-mode)
:config :config
;; (org-capture-init) ;; (org-capture-init)
(add-to-list 'org-modules 'org-habit) (add-to-list 'org-modules 'org-habit)
(setq org-directory "~/org/") (setq org-directory "~/org/")
(add-to-list 'org-agenda-files "~/org") (add-to-list 'org-agenda-files "~/org")
(setq org-highlight-latex-and-related '(native latex entities)) (setq org-highlight-latex-and-related '(native latex entities))
(setq org-hide-emphasis-markers t)
(setq org-pretty-entities t) (setq org-pretty-entities t)
(setq org-pretty-entities-include-sub-superscripts nil) (setq org-pretty-entities-include-sub-superscripts nil)
@@ -40,7 +38,22 @@
(setq org-hide-emphasis-markers t (setq org-hide-emphasis-markers t
org-pretty-entities t)) org-pretty-entities t))
:config :config
(setq org-modern-table nil)) (setq org-modern-table-vertical 1
org-modern-table-horizontal 0.2
org-modern-todo-faces
'(("TODO" :inverse-video t :inherit org-todo)
("PROJ" :inverse-video t :inherit +org-todo-project)
("STRT" :inverse-video t :inherit +org-todo-active)
("[-]" :inverse-video t :inherit +org-todo-active)
("HOLD" :inverse-video t :inherit +org-todo-onhold)
("WAIT" :inverse-video t :inherit +org-todo-onhold)
("[?]" :inverse-video t :inherit +org-todo-onhold)
("KILL" :inverse-video t :inherit +org-todo-cancel)
("NO" :inverse-video t :inherit +org-todo-cancel))
org-modern-list '((43 . "")
(45 . "")
(42 . ""))
))
(use-package org-modern-indent (use-package org-modern-indent
:ensure (org-modern-indent :type git :host github :repo "jdtsmith/org-modern-indent") :ensure (org-modern-indent :type git :host github :repo "jdtsmith/org-modern-indent")
@@ -48,7 +61,13 @@
(add-hook 'org-mode-hook #'org-modern-indent-mode 90)) (add-hook 'org-mode-hook #'org-modern-indent-mode 90))
(use-package org-appear (use-package org-appear
:defer) :hook (org-mode . org-appear-mode)
:config
(setq org-appear-autoemphasis t
org-appear-autosubmarkers t
org-appear-autolinks nil)
(run-at-time nil nil #'org-appear--set-elements)
)
(use-package hl-todo (use-package hl-todo
:hook (prog-mode . hl-todo-mode) :hook (prog-mode . hl-todo-mode)

View File

@@ -6,6 +6,7 @@
:bind ("C-h M-m" . which-key-show-major-mode) :bind ("C-h M-m" . which-key-show-major-mode)
:hook (elpaca-after-init . which-key-mode) :hook (elpaca-after-init . which-key-mode)
:init (setq which-key-max-description-length 30 :init (setq which-key-max-description-length 30
which-key-idle-delay 0.5
which-key-lighter nil which-key-lighter nil
which-key-show-remaining-keys t) which-key-show-remaining-keys t)
:config :config