-
Notifications
You must be signed in to change notification settings - Fork 0
/
duomacs-init.el
96 lines (80 loc) · 2.58 KB
/
duomacs-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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
;;; duomacs-init.el --- duomacs init setup -*- lexical-binding: t; -*-
;;; Summary:
;;; Commentary:
;;;
;;; This file is intended to be used as an Emacs init.el file.
;;;
;;; Code:
(defgroup duomacs nil
"Group containing options to customize duomacs directly."
:group 'personalization
:prefix "duomacs-")
(defconst duomacs-root
(file-name-directory
(file-truename
(or load-file-name
(buffer-file-name))))
"Absolute path to the root duomacs directory.")
;; memory management: perform no GC during startup, then raise the limit from the
;; default value to something more suitable for modern machines
(defvar duomacs/gc-cons-threshold (* 1024 1024 32))
(setq gc-cons-threshold most-positive-fixnum)
(add-hook
'after-init-hook
(lambda ()
(setq gc-cons-threshold duomacs/gc-cons-threshold)))
;; speedier handling of large LSP messages
(when (functionp 'json-serialize)
(setq read-process-output-max (* 1024 1024 8)))
(when load-file-name
(add-to-list
'custom-theme-load-path
(concat
duomacs-root
"themes")))
(setq
custom-safe-themes t
custom-file (concat (if user-init-file
(file-name-directory user-init-file)
"~/")
"duomacs-custom.el"))
;; (add-to-list
;; 'treesit-extra-load-path
;; "/usr/local/lib/tree-sitter/")
;; try real hard to use UTF-8 everywhere all the time
;; (some of this might be unnecessary and/or deprecated)
(set-language-environment "UTF-8")
(set-charset-priority 'unicode)
(setq locale-coding-system 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
(set-selection-coding-system 'utf-8)
(prefer-coding-system 'utf-8)
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))
;; first, tell emacs where to find our other packages
(add-to-list 'load-path duomacs-root)
(add-to-list 'load-path (concat duomacs-root "language-modes/"))
(add-to-list 'load-path (concat duomacs-root "themes/"))
;; now, load them
(require 'duomacs-pkg-mgmt)
(require 'duomacs-dashboard)
(require 'duomacs-keys)
(require 'duomacs-menu)
(require 'duomacs-themes)
(require 'duomacs-modes)
(require 'duomacs-fonts)
(require 'duomacs-modeline)
(require 'duomacs-term)
(require 'duomacs-dockerfile)
(require 'duomacs-dotenv)
(require 'duomacs-elisp)
(require 'duomacs-javascript-typescript)
(require 'duomacs-markdown)
(require 'duomacs-python)
(require 'duomacs-yaml)
;; load user preferences if they exist, or fall back to our own defaults when they don't
(if (file-exists-p custom-file)
(load-file custom-file)
(require 'duomacs-custom))
(provide 'duomacs-init)
;;; duomacs-init.el ends here