mirror of
http://github.com/JaeUs3792/dotfiles
synced 2025-12-14 08:01:35 +09:00
47 lines
1.9 KiB
EmacsLisp
47 lines
1.9 KiB
EmacsLisp
;;; early-init.el -*- lexical-binding: t; -*-
|
|
|
|
;; Increase the GC threshold for faster startup
|
|
;; The default is 800 kilobytes. Measured in bytes.
|
|
(setq gc-cons-threshold (* 50 1000 1000))
|
|
|
|
;; Prefer loading newest compiled .el file
|
|
(setq load-prefer-newer noninteractive)
|
|
|
|
;; Native compilation settings
|
|
(when (featurep 'native-compile)
|
|
;; Silence compiler warnings as they can be pretty disruptive
|
|
(setq native-comp-async-report-warnings-errors nil)
|
|
|
|
;; Make native compilation happens asynchronously
|
|
(setq native-comp-deferred-compilation t)
|
|
|
|
;; Set the right directory to store the native compilation cache
|
|
;; NOTE the method for setting the eln-cache directory depends on the emacs version
|
|
(when (fboundp 'startup-redirect-eln-cache)
|
|
(if (version< emacs-version "29")
|
|
(add-to-list 'native-comp-eln-load-path (convert-standard-filename (expand-file-name "var/eln-cache/" user-emacs-directory)))
|
|
(startup-redirect-eln-cache (convert-standard-filename (expand-file-name "var/eln-cache/" user-emacs-directory)))))
|
|
|
|
(add-to-list 'native-comp-eln-load-path (expand-file-name "eln-cache/" user-emacs-directory)))
|
|
|
|
;; Don't use package.el, we'll use straight.el instead
|
|
(setq package-enable-at-startup nil)
|
|
|
|
;; Remove some unneeded UI elements (the user can turn back on anything they wish)
|
|
(setq inhibit-startup-message t)
|
|
(push '(tool-bar-lines . 0) default-frame-alist)
|
|
(push '(menu-bar-lines . 0) default-frame-alist)
|
|
(push '(vertical-scroll-bars) default-frame-alist)
|
|
(push '(mouse-color . "white") default-frame-alist)
|
|
|
|
;; Loads a nice blue theme, avoids the white screen flash on startup.
|
|
(load-theme 'deeper-blue t)
|
|
|
|
;; Make the initial buffer load faster by setting its mode to fundamental-mode
|
|
(setq initial-major-mode 'fundamental-mode)
|
|
|
|
;; Load the early config file if it exists
|
|
(let ((early-config-path (expand-file-name "~/.emacs.df/early-config.el")))
|
|
(when (file-exists-p early-config-path)
|
|
(load early-config-path nil 'nomessage)))
|