-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.emacs
86 lines (68 loc) · 1.87 KB
/
.emacs
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
;;
;; Theme
;;
(setq lauremacs-default-dark-theme 'transparent)
(lauremacs/theme-load 'system)
;;
;; Loading another packages
;;
(require 'web-search)
(require 'zap)
(use-package expand-region)
(add-hook 'prog-mode-hook
(lambda ()
(setq indent-tabs-mode nil)
(flyspell-mode 1)))
;;
;; Load config files
;;
(defconst elisp-file-rx (rx line-start
(+ (| "-" "." alphanumeric))
".el"
line-end))
(let ((config-files (directory-files
lauremacs-config-dir-old
t
elisp-file-rx)))
(mapcar 'load-file config-files))
;;
;; require private files
;;
(dolist (file (directory-files
lauremacs-elisp-private-files
nil
elisp-file-rx))
(fp/pipe file
'file-name-sans-extension
'intern
'require-without-throw))
;; Load secret env variables
(require-without-throw 'env-private)
;; auto revert mode
(global-auto-revert-mode 1)
;;
;; Dealing with macos too many open files problem
;;
(defun file-notify-rm-all-watches ()
"Remove all existing file notification watches from Emacs."
(interactive)
(maphash
(lambda (key _value)
(file-notify-rm-watch key))
file-notify-descriptors))
(setq auto-revert-use-notify nil)
;;
;; Custom variables
;;
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages '(use-package)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)