;; -*- lexical-binding: t -*- (if noninteractive ; in CLI sessions (setq-default gc-cons-threshold 100000000 ; 128MB ;; Backport from 29 (see emacs-mirror/emacs@73a384a98698) gc-cons-percentage 1.0) (setq-default gc-cons-threshold most-positive-fixnum)) (setq read-process-output-max (* 1024 1024)) (setq package-enable-at-startup nil) (setq native-comp-jit-compilation t) (setq native-comp-async-report-warnings-errors nil) (add-to-list 'load-path (expand-file-name "lisp/" user-emacs-directory)) (setq use-package-enable-imenu-support t) (setq load-prefer-newer noninteractive) (setenv "LSP_USE_PLISTS" "true") ;; Lsp-mode plists (setenv "LIBGS" "/opt/homebrew/lib/libgs.dylib") ;; PERF: Many elisp file API calls consult `file-name-handler-alist'. ;; Setting it to nil speeds up startup significantly. ;; We restore it in init.el after startup. (setq file-name-handler-alist nil) ;; PERF: Reduce file-name operations on `load-path'. ;; No dynamic modules are loaded this early, so we skip .so/.dll search. ;; Also skip .gz to avoid decompression checks. (setq load-suffixes '(".elc" ".el") load-file-rep-suffixes '("")) (prefer-coding-system 'utf-8) ;; Inhibit resizing frame (setq frame-inhibit-implied-resize t) ;; Suppress GUI features (setq use-file-dialog nil use-dialog-box nil inhibit-startup-screen t inhibit-startup-echo-area-message user-login-name inhibit-default-init t initial-major-mode 'fundamental-mode initial-scratch-message nil) ;; Faster to disable these here (before they've been initialized) (push '(menu-bar-lines . 0) default-frame-alist) (push '(tool-bar-lines . 0) default-frame-alist) (push '(vertical-scroll-bars . nil) default-frame-alist) (push '(horizontal-scroll-bars . nil) default-frame-alist) (when (featurep 'ns) (push '(ns-transparent-titlebar . t) default-frame-alist)) ;; (push '(ns-appearance . light) default-frame-alist)) ;; Prevent flash of unstyled mode line (setq mode-line-format nil) (provide 'early-init)