1 ;;; init.el --- Load the full configuration -*- lexical-binding: t; -*-
4 ;; This file bootstraps the configuration, which is divided into
5 ;; a number of other files.
9 ;; Produce backtraces when errors occur: can be helpful to diagnose startup issues
10 ;;(setq debug-on-error t)
12 (let ((minver "27.1"))
13 (when (version< emacs-version minver
)
14 (error "Emacs v%s or higher is required" minver
)))
16 (add-to-list 'load-path
(expand-file-name "lisp" user-emacs-directory
))
17 (require 'init-benchmarking
) ;; Measure startup time
19 (defconst *spell-check-support-enabled
* nil
) ;; Enable with t if you prefer
20 (defconst *is-a-mac
* (eq system-type
'darwin
))
21 (defconst *linux
* (or (eq system-type
'gnu
/linux
) (eq system-type
'linux
)))
22 (defconst *windows
* (eq system-type
'windows-nt
))
25 ;; Adjust garbage collection threshold for early startup (see use of gcmh below)
26 (setq gc-cons-threshold
(* 128 1024 1024))
29 (setq custom-file
(expand-file-name "custom.el" user-emacs-directory
))
31 (require 'init-site-lisp
) ;; Must come before elpa, as it may provide package.el
32 ;; Calls (package-initialize)
33 (require 'init-elpa
) ;; Machinery for installing required packages
34 (require 'init-exec-path
) ;; Set up $PATH
37 ;; General performance tuning
38 (when (require-package 'gcmh
)
39 (setq gcmh-high-cons-threshold
(* 128 1024 1024))
40 (add-hook 'after-init-hook
(lambda ()
42 (diminish 'gcmh-mode
))))
44 (setq jit-lock-defer-time
0)
47 ;; Allow users to provide an optional "init-preload-local.el"
48 (require 'init-preload-local nil t
)
50 ;; Load configs for specific features and modes
51 (require-package 'diminish
)
52 (maybe-require-package 'scratch
)
54 (require 'init-frame-hooks
)
55 (require 'init-global
)
57 (require 'init-themes
)
59 (require 'init-uniquify
)
60 (require 'init-ibuffer
)
61 (require 'init-flycheck
)
63 (require 'init-whitespace
)
64 (require 'init-minimap
)
65 (require 'init-tabbar
)
67 (require 'init-minibuffer
)
70 (require 'init-neotree
)
72 (require 'init-projectile
)
74 (require 'init-compile
)
77 (require 'init-docker
)
78 (require 'init-markdown
)
80 (require 'init-python
)
85 (require 'init-terraform
)
88 (require 'init-paredit
)
92 ;; (require 'init-pyim)
94 (require 'init-folding
)
98 (require-package 'osx-location
))
99 (maybe-require-package 'dotenv-mode
)
101 (when (maybe-require-package 'uptimes
)
102 (setq-default uptimes-keep-count
200)
103 (add-hook 'after-init-hook
(lambda () (require 'uptimes
))))
105 (when (fboundp 'global-eldoc-mode
)
106 (add-hook 'after-init-hook
'global-eldoc-mode
))
108 (require 'init-direnv
)
110 (when (and (require 'treesit nil t
)
111 (fboundp 'treesit-available-p
)
112 (treesit-available-p))
113 (require 'init-treesitter
))
116 ;; Allow access from emacsclient
117 (add-hook 'after-init-hook
120 (unless (server-running-p)
123 ;; Variables configured via the interactive 'customize' interface
124 (when (file-exists-p custom-file
)
127 ;; Allow users to provide an optional "init-local" containing personal settings
128 (require 'init-local nil t
)
131 (delete-file "~/Library/Colors/Emacs.clr"))
134 ;;; init.el ends here