Benchmark init and optimize it a bit

This commit is contained in:
jdormit 2024-05-04 23:05:38 -04:00
parent 9fdc85de65
commit a544811fae
5 changed files with 16 additions and 9 deletions

View File

@ -1,7 +1,7 @@
;; -*- lexical-binding: t; -*-
;; Icons!
(use-package all-the-icons)
(use-package nerd-icons)
;; A neat dashboard when you open Emacs
(use-package dashboard
@ -12,6 +12,8 @@
(setq dashboard-startup-banner pic)))
(dashboard-setup-startup-hook)
:custom
(dashboard-display-icons-p t)
(dashboard-icon-type 'nerd-icons)
(dashboard-items '((projects . 5) (recents . 5)))
(dashboard-set-heading-icons t)
(dashboard-set-file-icons t)

View File

@ -1,9 +1,9 @@
;; Email in Emacs via mu4e
(use-package mu4e
:straight `(:local-repo ,(directory-file-name (file-name-directory (locate-library "mu4e"))) :type built-in)
:defer 2
:if (locate-library "mu4e")
:commands (mu4e mu4e-update-mail-and-index)
:hook (after-init . (lambda () (mu4e t)))
:config
(setq
;; General
@ -509,6 +509,7 @@ If given prefix arg ARG, skips markdown conversion."
"t" #'mu4e-view-mark-thread
"s" mu4e-search-map))
(add-hook 'mu4e-headers-mode-hook #'my-mu4e-headers-mode-setup)
(add-hook 'mu4e-view-mode-hook #'my-mu4e-view-mode-setup))
(add-hook 'mu4e-view-mode-hook #'my-mu4e-view-mode-setup)
(mu4e t))
(provide 'init-email)

View File

@ -1,5 +1,6 @@
;; -*- lexical-binding: t; -*-
(use-package mermaid-mode)
(use-package mermaid-mode
:defer t)
(provide 'init-mermaid)

View File

@ -14,8 +14,8 @@
;; Doom themes are the best themes!
(use-package doom-themes)
(use-package doom-modeline
:config
(doom-modeline-mode 1)
:hook
(after-init . doom-modeline-mode)
:custom
(doom-modeline-env-version nil)
(doom-modeline-env-enable-python nil)
@ -25,9 +25,6 @@
(doom-modeline-env-enable-elixir nil)
(doom-modeline-env-enable-rust nil))
;; Load custom themes
(add-to-list 'custom-theme-load-path (expand-file-name "config/themes" user-emacs-directory))
;; A small package to hide the mode line
(use-package hide-mode-line
:commands hide-mode-line-mode)

View File

@ -37,6 +37,12 @@
(straight-use-package 'use-package)
(setq straight-use-package-by-default t)
(use-package benchmark-init
:ensure t
:config
;; To disable collection of benchmark data after init is done.
(add-hook 'after-init-hook 'benchmark-init/deactivate))
;; "Garbage Collection Magic Hack"
(use-package gcmh
:demand t