aboutsummaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el73
1 files changed, 73 insertions, 0 deletions
diff --git a/init.el b/init.el
index e69de29..77f06a0 100644
--- a/init.el
+++ b/init.el
@@ -0,0 +1,73 @@
+;;; init.el --- Main Emacs configuration -*- lexical-binding: t; -*-
+
+;; Copyright (C) 2026 Richard Qin
+;; SPDX-License-Identifier: GPL-3.0-or-later
+
+;; Author: Richard Qin
+;; This file is not part of GNU Emacs.
+
+;;; Commentary:
+
+;; Main entry point for the Emacs configuration.
+;; Configure load paths and initialize configuration modules.
+
+;;; Code:
+
+;; ------------------------------------------------------------
+;; Load paths
+;; ------------------------------------------------------------
+
+(defvar my/config-directories
+ '("core"
+ "ui"
+ "completion"
+ "editing"
+ "development"
+ "languages"
+ "writing"
+ "tools")
+ "Directories containing Emacs configuration modules.")
+
+(dolist (dir my/config-directories)
+ (add-to-list
+ 'load-path
+ (expand-file-name
+ (concat "lisp/" dir)
+ user-emacs-directory)))
+
+;; Custom Emacs Lisp extensions.
+(add-to-list
+ 'load-path
+ (expand-file-name "site-lisp" user-emacs-directory))
+
+
+;; ------------------------------------------------------------
+;; Customize
+;; ------------------------------------------------------------
+
+(setq custom-file
+ (expand-file-name
+ "var/custom.el"
+ user-emacs-directory))
+
+(make-directory
+ (file-name-directory custom-file)
+ t)
+
+
+;; ------------------------------------------------------------
+;; Core modules
+;; ------------------------------------------------------------
+
+(require 'init-packages)
+(require 'init-defaults)
+
+
+;; ------------------------------------------------------------
+;; Custom settings
+;; ------------------------------------------------------------
+
+(when (file-exists-p custom-file)
+ (load custom-file nil 'nomessage))
+
+;;; init.el ends here