wip: feat: Defer many packages

Shaving MILLISECONDS off our startup time!!!  Fuck yes!

I've measured the average startup time to be 0.68s in the previous commit, and an average of 0.52 with this commit.
This commit is contained in:
Madeleine Sydney
2025-01-08 06:52:18 -07:00
parent 27e78453e3
commit ab10e0ca56
9 changed files with 138 additions and 79 deletions

View File

@@ -2,11 +2,9 @@
;; Show possible completions for a partially-entered key sequence.
(use-package which-key
:custom
(which-key-allow-evil-operators t)
(which-key-show-operator-state-maps t)
:config
(which-key-mode 1))
:hook (on-first-input . which-key-mode)
:custom ((which-key-allow-evil-operators t)
(which-key-show-operator-state-maps t)))
;; Beautiful theme in dark and light.
(use-package kanagawa-themes
@@ -16,17 +14,20 @@
(use-package emacs
:custom
;; Allow the opening of new minibuffers from inside existing minibuffers.
(enable-recursive-minibuffers t)
;; Hide commands in M-x which do not work in the current mode.
(read-extended-command-predicate #'command-completion-default-include-p)
((enable-recursive-minibuffers t)
;; Hide commands in M-x which do not work in the current mode.
(read-extended-command-predicate #'command-completion-default-include-p))
:config
;; Disable blinking cursor. I don't really like it, but it also doesn't play
;; well with `evil-terminal-cursor-changer'.
;; Disable blinking cursor. Aesthetically, I personally don't fancy it;
;; technically, it doesn't play well with `evil-terminal-cursor-changer'.
(blink-cursor-mode -1))
;; Vertico is a simple completion engine that replaces Emacs' built-in
;; completion engine, achieving Just Works™ compatibility. This is in contrast
;; to e.g. Helm and Ivy, which spawn ecosystems orthogonal to Emacs, and
;; diametrically-opposed to each other.
(use-package vertico
:init
(vertico-mode 1))
:hook (on-first-input . vertico-mode))
;; Orderless provides a completion style that divides the pattern into
;; space-separated components, and matches candidates that match all of the
@@ -34,8 +35,8 @@
;; ways: literally, as a regexp, as an initialism, in the flex style, or as
;; multiple word prefixes. By default, regexp and literal matches are enabled.
(use-package orderless
:custom
(completion-styles '(orderless basic))
(completion-category-overrides '((file (styles basic partial-completion)))))
:custom ((completion-styles '(orderless basic))
(completion-category-overrides
'((file (styles basic partial-completion))))))
(provide 'syd-ui)