early-init.el 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. ;;; early-init.el --- Early Init File -*- lexical-binding: t -*-
  2. ;;; Commentary:
  3. ;;; Code:
  4. (setq gc-cons-threshold most-positive-fixnum
  5. gc-cons-percentage 0.6)
  6. (push '(menu-bar-lines . 0) default-frame-alist)
  7. (push '(tool-bar-lines . 0) default-frame-alist)
  8. (push '(vertical-scroll-bars) default-frame-alist)
  9. (when (featurep 'ns)
  10. (push '(ns-transparent-titlebar . t) default-frame-alist))
  11. (setq frame-inhibit-implied-resize t)
  12. (toggle-frame-maximized)
  13. (add-to-list 'default-frame-alist '(fullscreen . maximized))
  14. (menu-bar-mode -1)
  15. (when window-system
  16. (tool-bar-mode -1)
  17. (scroll-bar-mode -1)
  18. (horizontal-scroll-bar-mode -1))
  19. (setq package-enable-at-startup nil)
  20. ;; Some optimizations from doom.el (some of these probably don't belong here!)
  21. (setq auto-mode-case-fold nil)
  22. (setq-default bidi-display-reordering 'left-to-right
  23. bidi-paragraph-direction 'left-to-right)
  24. (setq bidi-inhibit-bpa t)
  25. (setq-default cursor-in-non-selected-windows nil)
  26. (setq highlight-nonselected-windows nil)
  27. (setq fast-but-imprecise-scrolling t)
  28. (setq idle-update-delay 1.0)
  29. (setq inhibit-compacting-font-caches t)
  30. (setq redisplay-skip-fontification-on-input t)
  31. (define-advice load-file (:override (file) silence)
  32. (load file nil 'nomessage))
  33. (define-advice startup--load-user-init-file (:before (&rest _) undo-silence)
  34. (advice-remove #'load-file #'load-file@silence))
  35. ;;; early-init.el ends here