diff --git a/.gitignore b/.gitignore index e787da3..f6d83c6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,25 @@ -* -!README.md -!early-init.el -!init.el -!.images/ -!.LICENSE +/auto-save-list/ +/custom.el +/easysession +/eln-cache/ +/elpa/ +/elpaca/ +/etc/ +/history +/ielm-history.eld +/lisp/ +/projectile-bookmarks.eld +/recentf +/saveplace +/tramp +/straight/ +/themes/ +/transient/ +/tree-sitter/ +/undo-fu-session/ +/var/ +/bookmarks +/bookmarks +/ido.last +/autosave/ +/url/ diff --git a/post-init.el b/post-init.el new file mode 100644 index 0000000..6767341 --- /dev/null +++ b/post-init.el @@ -0,0 +1,40 @@ +;;; post-init.el --- This file is loaded after init.el. -*- no-byte-compile: t; lexical-binding: t; -*- + +;; Use straight.el for package management, integrate with use-package. +(setq straight-use-package-by-default t) + +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name + "straight/repos/straight.el/bootstrap.el" + (or (bound-and-true-p straight-base-dir) + user-emacs-directory))) + (bootstrap-version 7)) + (unless (file-exists-p bootstrap-file) + (with-current-buffer + (url-retrieve-synchronously + "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" + 'silent 'inhibit-cookies) + (goto-char (point-max)) + (eval-print-last-sexp))) + (load bootstrap-file nil 'nomessage)) + +;; The compile-angel package automatically byte-compiles and +;; native-compiles Emacs Lisp libraries. It should be loaded before +;; any other package. +(use-package compile-angel + :demand t + :custom + (compile-angel-verbose nil) + :config + (compile-angel-on-load-mode) + (add-hook 'emacs-lisp-mode-hook #'compile-angel-on-save-local-mode)) + +;; Load the configs from plug-in files. +(let ((config-dir (concat minimal-emacs-user-directory ".config.d"))) + (if (not (file-exists-p config-dir)) + (make-directory config-dir)) + (dolist (lisp-file (directory-files config-dir t directory-files-no-dot-files-regexp)) + (load lisp-file nil 'nomessage))) + +;;; post-init.el ends here diff --git a/pre-early-init.el b/pre-early-init.el new file mode 100644 index 0000000..4dce80b --- /dev/null +++ b/pre-early-init.el @@ -0,0 +1,8 @@ +;;; pre-early-init.el --- This file is loaded before early-init.el. -*- no-byte-compile: t; lexical-binding: t; -*- + +;; Reducing clutter in ~/.emacs.d by redirecting files to ~/emacs.d/var/ +(setq minimal-emacs-var-dir (expand-file-name "var/" minimal-emacs-user-directory)) +(setq package-user-dir (expand-file-name "elpa" minimal-emacs-var-dir)) +(setq user-emacs-directory minimal-emacs-var-dir) + +;;; pre-early-init.el ends here