diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2024-01-07 13:04:45 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2024-01-07 13:04:45 -0500 |
commit | 7a07cdd61d626b42f2b05ef8fb843a29b57ed580 (patch) | |
tree | fe02140e0d66312e35ce0f1236fdf50eafb490f1 /emacs/.config/emacs-v2/init.el | |
parent | d2f973eb627c64f25e76d08418956e9a26b9853a (diff) |
Testing new configuration
Diffstat (limited to 'emacs/.config/emacs-v2/init.el')
-rw-r--r-- | emacs/.config/emacs-v2/init.el | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/emacs/.config/emacs-v2/init.el b/emacs/.config/emacs-v2/init.el new file mode 100644 index 0000000..ddc40f1 --- /dev/null +++ b/emacs/.config/emacs-v2/init.el @@ -0,0 +1,40 @@ +;;; -*- lexical-binding: t; -*- + +;; NixOS emacs doesn't include a build time. Assume a recent version. +(setq elpaca-core-date 20240101) +(setq elpaca-directory "~/.cache/emacs/elpaca") +(load-file (expand-file-name "elpaca-installer.el" user-emacs-directory)) + +(add-hook 'emacs-startup-hook + (lambda () + (message "Emacs ready in %s with %d garbage collections." + (format "%.2f seconds" + (float-time + (time-subtract after-init-time before-init-time))) + gcs-done))) + +(add-hook 'elpaca-after-init-hook 'kj/restore-file-name-handler-alist) + +(elpaca elpaca-use-package + ;; Enable :elpaca use-package keyword. + (elpaca-use-package-mode) + ;; Assume :elpaca t unless otherwise specified. + (setq elpaca-use-package-by-default t)) +(elpaca-wait) + +(use-package gcmh + :hook + (elpaca-after-init . kj/enable-gcmh) + :config + (defun kj/enable-gcmh () + (message "Enabling gcmh") + (gcmh-mode 1))) + +;; Include user configuration. +(defvar kj/module-directory (expand-file-name "lisp" user-emacs-directory)) +(push kj/module-directory load-path) +(require 'kj-lib) +(require 'kj-init) +(cl-loop for path in (directory-files kj/module-directory) + if (string-match "\\([^/]*\\).el" path) + do (require (intern (match-string-no-properties 1 path)))) |