From ed2abc29486a9f5f4a9b76949ca3012f24a9bf69 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Thu, 29 Oct 2026 00:31:53 +0800 Subject: Add basic configurations Signed-off-by: Richard Qin --- init.el | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) (limited to 'init.el') 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 -- cgit v1.2.3