From 955f2a223ca76fd4c606e1346731ce2b4f6ed5ac Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Mon, 13 May 2024 17:01:24 +0530 Subject: (Emacs/config|init)~cut my init time to just a second I had a problem with after-init-hook which would (while supposedly keeping (emacs-init-time) under 1.2 seconds) take ages to start emacs just due to how many things were starting up using it. So I removed all the after-init-hook functions and instead aggressively demand the stuff I need and defer everything else through ":defer", ":after", ":hook" and ":general". Happy to say my boot time is now actually 1.2 seconds without compilation. --- Emacs/.config/emacs/init.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Emacs/.config/emacs/init.el') diff --git a/Emacs/.config/emacs/init.el b/Emacs/.config/emacs/init.el index 6571584..0f7dfe8 100644 --- a/Emacs/.config/emacs/init.el +++ b/Emacs/.config/emacs/init.el @@ -27,6 +27,10 @@ ;; possible. (let ((gc-cons-threshold most-positive-fixnum)) ;; Straight + (setq straight-disable-native-compile nil + straight-use-package-by-default nil + straight-check-for-modifications 'live) + (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name @@ -43,9 +47,7 @@ (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) - (setq straight-disable-native-compile nil - straight-use-package-by-default t - use-package-enable-imenu-support t + (setq use-package-enable-imenu-support t use-package-always-demand nil use-package-always-defer nil use-package-hook-name-suffix nil @@ -74,6 +76,8 @@ (when (daemonp) (require 'general) (require 'evil) + (require 'ivy) + (require 'counsel) (require 'notmuch) (require 'company) (require 'org) -- cgit v1.2.3-13-gbd6f