-
Notifications
You must be signed in to change notification settings - Fork 2
/
early-init.el
29 lines (26 loc) · 1.13 KB
/
early-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
(when (fboundp 'native-compile-async)
(setenv "LIBRARY_PATH"
(concat (getenv "LIBRARY_PATH") "/usr/local/opt/gcc/lib/gcc/current:/usr/local/opt/gcc/lib/gcc/current/gcc/x86_64-apple-darwin22/13"))
(setq native-comp-speed 4)
(setq native-comp-async-jobs-number 8)
;;(setq inhibit-automatic-native-compilation t)
(setq native-comp-async-report-warnings-errors 'silent)
)
;; 加载较新的 .el 文件。
(setq-default load-prefer-newer t)
(setq-default lexical-binding t)
(setq lexical-binding t)
(setq custom-file (expand-file-name "~/.emacs.d/custom.el"))
(add-hook 'after-init-hook (lambda () (when (file-exists-p custom-file) (load custom-file))))
(setq my-bin-path '(
"/usr/local/opt/findutils/libexec/gnubin"
"/Users/zhangjun/go/bin"
"/Users/zhangjun/.cargo/bin"
))
;; 设置 Emacs 启动外部程序时(如 lsp server)给它们传入的环境变量。
(mapc (lambda (p)
(setenv "PATH" (concat p ":" (getenv "PATH"))))
my-bin-path)
(let ((paths my-bin-path))
(dolist (path paths)
(setq exec-path (cons path exec-path))))