2025-12-14 04:51:24 +11:00
|
|
|
;; -*- lexical-binding: t -*-
|
|
|
|
|
|
2026-03-30 11:49:18 +11:00
|
|
|
(if noninteractive ; in CLI sessions
|
2026-03-30 16:37:02 +11:00
|
|
|
(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))
|
2026-02-25 22:18:53 +11:00
|
|
|
|
2026-03-30 11:49:18 +11:00
|
|
|
(setq read-process-output-max (* 1024 1024))
|
2026-02-25 22:18:53 +11:00
|
|
|
|
2025-12-16 09:41:13 +11:00
|
|
|
(setq package-enable-at-startup nil)
|
2025-12-14 21:09:42 +11:00
|
|
|
|
2026-04-05 21:31:02 +10:00
|
|
|
(setq native-comp-jit-compilation nil)
|
2026-03-22 20:26:17 +11:00
|
|
|
(setq native-comp-async-report-warnings-errors nil)
|
2026-03-20 00:44:25 +11:00
|
|
|
|
2025-12-15 18:20:19 +11:00
|
|
|
(add-to-list 'load-path (expand-file-name "lisp/" user-emacs-directory))
|
2025-12-22 21:20:02 +11:00
|
|
|
(setq use-package-enable-imenu-support t)
|
|
|
|
|
(setq load-prefer-newer noninteractive)
|
2025-12-16 09:41:13 +11:00
|
|
|
|
2026-04-02 13:27:43 +11:00
|
|
|
(setenv "LSP_USE_PLISTS" "true") ;; Lsp-mode plists
|
2026-04-03 15:54:22 +11:00
|
|
|
(setenv "LIBGS" "/opt/homebrew/lib/libgs.dylib")
|
2026-03-30 11:49:18 +11:00
|
|
|
|
|
|
|
|
;; 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 '(""))
|
|
|
|
|
|
2025-12-14 21:09:42 +11:00
|
|
|
(prefer-coding-system 'utf-8)
|
|
|
|
|
;; Inhibit resizing frame
|
|
|
|
|
(setq frame-inhibit-implied-resize t)
|
|
|
|
|
|
2026-04-02 13:27:43 +11:00
|
|
|
;; 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)
|
|
|
|
|
|
2025-12-14 21:09:42 +11:00
|
|
|
;; 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)
|
2026-03-29 19:12:45 +11:00
|
|
|
(push '(vertical-scroll-bars . nil) default-frame-alist)
|
|
|
|
|
(push '(horizontal-scroll-bars . nil) default-frame-alist)
|
2025-12-14 21:09:42 +11:00
|
|
|
(when (featurep 'ns)
|
2025-12-17 03:29:19 +11:00
|
|
|
(push '(ns-transparent-titlebar . t) default-frame-alist))
|
2026-03-24 22:02:04 +11:00
|
|
|
;; (push '(ns-appearance . light) default-frame-alist))
|
2025-12-14 21:09:42 +11:00
|
|
|
|
|
|
|
|
;; Prevent flash of unstyled mode line
|
2026-03-24 22:02:04 +11:00
|
|
|
(setq mode-line-format nil)
|
2025-12-14 21:09:42 +11:00
|
|
|
|
2025-12-17 03:29:19 +11:00
|
|
|
(provide 'early-init)
|