From 2fb72671c096779830912dbe84ba704ce695d879 Mon Sep 17 00:00:00 2001 From: verdant Date: Sat, 2 May 2026 00:17:22 +0800 Subject: refactor: migrate configuration to a single org-mode file --- init.el | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index d373a05..c9cdceb 100644 --- a/init.el +++ b/init.el @@ -1,12 +1,16 @@ ;; -*- lexical-binding: t; -*- +(require 'org) (setq user-emacs-directory (expand-file-name "~/.emacs.d")) +(add-to-list 'load-path user-emacs-directory) +(let ((org-file (expand-file-name "config.org" user-emacs-directory)) + (el-file (expand-file-name "config.el" user-emacs-directory))) + (when (or (not (file-exists-p el-file)) + (file-newer-than-file-p org-file el-file)) + (org-babel-tangle-file org-file)) + (load-file el-file)) +(require 'config) -(add-to-list 'load-path (expand-file-name "core" user-emacs-directory)) -(add-to-list 'load-path (expand-file-name "packages" user-emacs-directory)) - -(require 'core) -(require 'packages) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -14,9 +18,10 @@ ;; If there is more than one, they won't work right. '(package-selected-packages '(ace-window clang-format color-theme-sanityinc-solarized company - counsel dashboard diredfl doom-themes evil-collection - evil-mu4e hugoista ivy-posframe ivy-rich leetcode - lsp-ui olivetti yasnippet))) + counsel dashboard diredfl doom-themes evil-collection + evil-mu4e hugoista ivy-posframe ivy-rich leetcode + lsp-ui magit olivetti org-bullets ox-hugo sis + yasnippet))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. -- cgit v1.2.3