-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
49 lines (40 loc) · 1.66 KB
/
init.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;;; init.el --- Emacs startup configuration -*- lexical-binding: t -*-
;;; Commentary:
;;
;; This runs after `early-init.el'.
;;
;;; Code:
;; Disable `custom.el'
(setopt custom-file null-device)
(use-package ok
;; Elisp utilities for Okome Studio. Loaded early so that they can
;; be used in `init.el'
:straight (ok :host github :repo "okomestudio/ok.el")
:demand t)
(use-package no-littering
;; Run this as early as possible.
:demand t
:custom ((no-littering-etc-directory (ok-file-expand-user-emacs-file "etc/"))
(no-littering-var-directory (ok-file-expand-user-emacs-file "var/")))
:config
(defun ok-file-expand-bin (&rest components)
"Expand the path to FILE in Emacs's bin/ directory."
(apply #'ok-file-expand-user-emacs-file `("bin" ,@components)))
(defun ok-file-expand-lisp (&rest components)
"Expand the path to FILE in Emacs's lisp/ directory."
(apply #'ok-file-expand-user-emacs-file `("lisp" ,@components)))
(defun ok-file-expand-straight-repos (&rest components)
"Expand the path to FILE in Emacs's straight/repos directory."
(apply #'ok-file-expand-user-emacs-file `("straight" "repos" ,@components)))
;; Define aliases for shorter names.
(defalias 'ok-file-expand-etc #'no-littering-expand-etc-file-name)
(defalias 'ok-file-expand-var #'no-littering-expand-var-file-name))
;;; Private initialization
(load (ok-file-expand-etc "emacs/init") t)
;; Load config files under `init.d/'
(use-package init-loader
:demand t
:custom ((init-loader-byte-compile nil)
(init-loader-show-log-after-init ok-debug))
:config (init-loader-load (ok-file-expand-user-emacs-file "init.d")))
;;; init.el ends here