-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
49 lines (33 loc) · 1.36 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
(defvar gc-cons-threshold-original gc-cons-threshold)
(setq gc-cons-threshold (* 100 1024 1024) gc-cons-percentage 0.6)
(defun set-custom-gc-threshold ()
(setq gc-cons-threshold gc-cons-threshold-original gc-cons-percentage 0.1))
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(setq tls-checktrust t
tls-program '("gnutls-cli --x509cafile %t -p %p %h")
gnutls-verify-error t)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
(unless (package-installed-p 'use-package)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
(use-package system-packages)
(use-package key-chord :config (key-chord-mode 1))
; set home and emacs dir
(defvar user-home-directory (concat (getenv "HOME") "/"))
(setq user-emacs-directory (concat user-home-directory ".emacs.d/"))
; save custom to separate dir
(setq custom-file (concat user-emacs-directory "custom/settings.el"))
(load custom-file :noerror :nomessage) ;; silent load
(add-to-list 'load-path (concat user-emacs-directory "elisp/"))
(require 'init-general)
(require 'init-visual)
(require 'init-ivy-counsel)
(package-install-selected-packages)
(require 'server)
(unless (server-running-p) (server-start))
;; reset gc-cons-threshold to original
(add-hook 'emacs-startup-hook #'set-custom-gc-threshold)