-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
98 lines (84 loc) · 3.6 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
;;; init.el --- Initialize emacs environment
(setq user-emacs-directory (expand-file-name ".emacs"))
;; Boostrap elpaca
(defvar elpaca-installer-version 0.6)
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
:ref nil
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
:build (:not elpaca--activate-package)))
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
(build (expand-file-name "elpaca/" elpaca-builds-directory))
(order (cdr elpaca-order))
(default-directory repo))
(add-to-list 'load-path (if (file-exists-p build) build repo))
(unless (file-exists-p repo)
(make-directory repo t)
(when (< emacs-major-version 28) (require 'subr-x))
(condition-case-unless-debug err
(if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
((zerop (call-process "git" nil buffer t "clone"
(plist-get order :repo) repo)))
((zerop (call-process "git" nil buffer t "checkout"
(or (plist-get order :ref) "--"))))
(emacs (concat invocation-directory invocation-name))
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
((require 'elpaca))
((elpaca-generate-autoloads "elpaca" repo)))
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
(error "%s" (with-current-buffer buffer (buffer-string))))
((error) (warn "%s" err) (delete-directory repo 'recursive))))
(unless (require 'elpaca-autoloads nil t)
(require 'elpaca)
(elpaca-generate-autoloads "elpaca" repo)
(load "./elpaca-autoloads")))
(add-hook 'after-init-hook #'elpaca-process-queues)
(elpaca `(,@elpaca-order))
(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 emacs
:elpaca nil
:config
;; Silence indentation messages from sh-set-shell in sh-mode.
(require 'cl-lib)
(advice-add 'sh-set-shell :around
(lambda (orig-fun &rest args)
(cl-letf (((symbol-function 'message) #'ignore))
(apply orig-fun args)))))
(use-package org
:config
(setq org-src-preserve-indentation t
org-src-fontify-natively t
org-html-toplevel-hlevel 1
org-export-with-section-numbers nil
org-id-locations-file (expand-file-name "./org-id-locations")))
(use-package org-roam
:after org
:init
(setq org-roam-v2-ack t)
:config
(setq org-roam-directory (expand-file-name "./org")
org-roam-dailies-directory "daily/"
org-roam-file-extensions '("org")
org-roam-db-location (expand-file-name "./org-roam.db")))
(use-package htmlize
:config
(setq org-html-htmlize-output-type 'css))
(use-package rainbow-delimiters)
(use-package python
:config
(setq python-indent-guess-indent-offset-verbose nil))
(use-package fish-mode)
(use-package weblorg
:elpaca (weblorg :host github :repo "nanzhong/weblorg" :branch "next")
:config
(require 'weblorg-org-roam))
(elpaca-wait)
;;; init.el ends here