diff options
author | noa | 2025-02-22 04:17:11 +0800 |
---|---|---|
committer | noa | 2025-02-22 04:17:11 +0800 |
commit | f98cfc61faeaac872892251995088fe3f7f469f4 (patch) | |
tree | b4481074c74cce1135ef3201a6c1c5113c0910dd /emacs/early-init.el | |
parent | 6d145ca7411f5775a4716b35f0485c08b9447338 (diff) |
Initial early-init.el commit
Diffstat (limited to 'emacs/early-init.el')
-rw-r--r-- | emacs/early-init.el | 43 |
1 files changed, 6 insertions, 37 deletions
diff --git a/emacs/early-init.el b/emacs/early-init.el index fc1027d..2a730bf 100644 --- a/emacs/early-init.el +++ b/emacs/early-init.el @@ -1,47 +1,16 @@ ;;; early-init.el -*- lexical-binding: t; -*- +;; Run before the package manager and ui are initialised -;; Emacs 27+ introduces early-init.el, which is run before init.el, -;; before package and UI initialization happens. - -;; In noninteractive sessions, prioritize non-byte-compiled source files to prevent the use of stale byte-code. Otherwise, it saves us a little IO time to skip the mtime checks on every *.elc file. -(setopt load-prefer-newer 'noninteractive - native-comp-jit-compilation nil) - -;; is this a bad idea? -;; (setopt site-run-file nil -;; inhibit-default-init t) -(setopt inhibit-x-resources t) - -;; In Emacs 27+, package initialization occurs before `user-init-file' is loaded, but after `early-init-file', so we can disable this here. -;; (setopt package-enable-at-startup nil) - -;; Gui changes are expensive -(setopt frame-inhibit-implied-resize t - default-frame-alist '((fullscreen . maximized) - (font . "Noto Serif-12"))) +(setopt inhibit-x-resources t + package-enable-at-startup nil + frame-inhibit-implied-resize t) +(push '(fullscreen . maximized) default-frame-alist) (push '(menu-bar-lines . 0) default-frame-alist) (push '(tool-bar-lines . 0) default-frame-alist) (push '(horizontal-scroll-bars) default-frame-alist) -(when (bound-and-true-p tooltip-mode) - (tooltip-mode -1)) -(setq use-file-dialog nil) -(setq use-dialog-box nil) -;; Override the tool-bar-setup function to prevent it from running during the initial stages of startup +;; Don't setup the toolbar ;; h/t https://github.com/jamescherti/minimal-emacs.d/ (when (fboundp 'tool-bar-setup) (advice-add #'tool-bar-setup :override #'ignore)) - -;; (setopt default-frame-alist '( -;; (menu-bar-lines . 0) -;; (tool-bar-lines . 0))) - -;; setup package -(setopt package-archives - '(("gnu" . "https://elpa.gnu.org/packages/") - ("nongnu" . "https://elpa.nongnu.org/nongnu/") - ("melpa" . "https://melpa.org/packages/"))) - -;; Ignore X resources; its settings would be redundant with the other settings in this file and can conflict with later config (particularly where the cursor color is concerned). -(advice-add #'x-apply-session-resources :override #'ignore) |