-
Notifications
You must be signed in to change notification settings - Fork 5
/
init.el
100 lines (83 loc) · 2.5 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
99
100
;;; nema --- Nayuki's EMAcs distro
;; -*- lexical-binding: t -*-
;;; Commentary:
"Nayuki's .emacs.d.
Heavily inspired by parcell/emacs.d, prelude and kuanyui/.emacs.d"
;;; Code:
;; If you meet something wrong,
;; (setq debug-on-error t)
(require 'package)
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
;; Core config files
(add-to-list 'load-path
(expand-file-name "nema" user-emacs-directory))
(require 'nema-customize-group)
;;; move customize-set-variable out of init.el
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(unless (file-exists-p custom-file)
(write-region "" nil custom-file)) ; Touch this file
(load custom-file)
;;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341
(when (version<= "27" emacs-version)
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
;; Core layers
(require 'nema-core)
(require 'nema-basic)
(require 'nema-appearance)
;; General purpose layers
(require 'nema-snippet)
(require 'nema-completion)
(require 'nema-lsp)
(require 'nema-vcs)
(require 'nema-project)
(require 'nema-terminal)
(require 'nema-systemd)
;; Language-specific layers
(require 'nema-restclient)
(require 'nema-php)
(require 'nema-ruby)
(require 'nema-org)
(require 'nema-markdown)
(require 'nema-javascript)
(require 'nema-java)
(require 'nema-python)
(require 'nema-rust)
(require 'nema-web)
(require 'nema-markup)
(require 'nema-lua)
(require 'nema-docker)
(require 'nema-c)
(require 'nema-dotnet)
(require 'nema-elixir)
(require 'nema-dart)
(require 'nema-go)
(require 'nema-clojure)
(require 'nema-swift)
(require 'nema-latex)
(require 'nema-ocaml)
(require 'nema-protobuf)
(require 'nema-haskell)
(require 'nema-nix)
(require 'nema-graphql)
;; misc
(require 'nema-dired)
;; local-defined scripts
;; (add-to-list 'load-path "~/.emacs.d/scripts)
;; (require 'my-scripts)
;; Key bindings
(if nema-use-evil
(require 'nema-evil))
;; Load all self configs in ~/.emacs.d/my
(let ((loaded (mapcar #'car load-history)))
(dolist (file (directory-files (expand-file-name "my" user-emacs-directory) t ".+\\.elc?$"))
(unless (catch 'load-error
(dolist (done loaded)
(when (equal file done) (throw 'load-error t)))
nil)
(load (file-name-sans-extension file))
(push file loaded))))
;;; init.el ends here