-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
50 lines (42 loc) · 1.69 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
;;; package -- core
;;; Commentary:
;;; Code:
(when (version< emacs-version "27")
;; Emacs 版本低于 27 时,手动加载‘early-init.el’
(load-file (expand-file-name "early-init.el" user-emacs-directory)))
;;;; Package 初始化
(require 'package)
(setq package-archives '(("gnu" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/gnu/")
("melpa" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/melpa/")
("org" . "http://mirrors.tuna.tsinghua.edu.cn/elpa/org/")))
;; (if (bound-and-true-p with-dump)
;; (setq load-path dump-load-path)
;; (package-initialize) )
(unless package--initialized (package-initialize))
(add-to-list 'load-path (expand-file-name "lisp" user-config-directory))
(add-to-list 'load-path (expand-file-name "modal" user-config-directory))
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
;; 启用 use-package 统计
(setq use-package-compute-statistics t)
(require 'use-package)
;; 安装 straight.el
(defvar bootstrap-version)
(let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el"
user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer (url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;;; 加载配置
(require 'core)
(require 'feature)
(require 'language)
;; (make-frame-visible)
(provide 'init)
;;; init.el ends here