-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.el
72 lines (51 loc) · 1.8 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
;;; init.el -*- lexical-binding: t; -*-
;;(setq user-emacs-directory (expand-file-name "Projects/dotemacs" (getenv "HOME")))
(defun update-load-path (&rest _)
"Update `load-path'."
(dolist (dir '("site-lisp" "lisp"))
(push (expand-file-name dir user-emacs-directory) load-path)))
(defun add-subdirs-to-load-path (&rest _)
"Add subdirectories to `load-path'."
(let ((default-directory (expand-file-name "site-lisp" user-emacs-directory)))
(normal-top-level-add-subdirs-to-load-path)))
(update-load-path)
;;(setq custom-theme-directory my-config-dir)
;;(setq bookmark-default-file (concat user-emacs-directory ".emacs.bmk")) ;书签文件
(setq gc-cons-threshold most-positive-fixnum
gc-cons-percentage 0.5)
(add-hook 'emacs-startup-hook
(lambda ()
"Recover GC values after startup."
(setq gc-cons-threshold 800000
gc-cons-percentage 0.1)))
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
;;(load custom-file 'noerror)
(defconst IS-WINDOWS (eq system-type 'windows-nt))
(defconst IS-MAC (eq system-type 'darwin))
(defconst IS-LINUX (eq system-type 'gnu/linux))
(defconst EMACS28+ (> emacs-major-version 27))
(defconst +my-org-dir (file-truename (expand-file-name "~/Nutstore/Notes/org/")))
(require 'init-defaults)
(require 'init-package)
(require 'init-basic)
(require 'init-ui)
(require 'init-binding)
(require 'init-project)
(require 'init-vertico)
(require 'init-edit)
(require 'init-chinese)
;;(require 'init-company)
(require 'init-org)
(require 'init-lsp)
(require 'init-rust)
(require 'init-python)
(require 'init-tex)
(require 'init-go)
(require 'init-git)
(require 'init-highlight)
(require 'init-hs)
;;(require 'init-flycheck)
;;(require 'init-dired)
(require 'init-window)
(require 'init-eaf)
(require 'init-server)