refactor: Reduce init time }:)
- Greatly increase gc-cons-threshold. This is the biggest win of this commit, shaving off about 400 ms. The GC runs a single time during init. - Sprinkle a few `:defer t`s throughout. wwwwfeat: Configure Orderless
This commit is contained in:
@@ -415,6 +415,7 @@ Following is a subset of the many places I've learnt from.
|
|||||||
- [cite:@christensen2020erase]
|
- [cite:@christensen2020erase]
|
||||||
- [cite:@ayats2024dropping]
|
- [cite:@ayats2024dropping]
|
||||||
- [cite:@zaynetdinov2024you]
|
- [cite:@zaynetdinov2024you]
|
||||||
|
- [cite:@schafer2017advanced]
|
||||||
- [[https://prelude.emacsredux.com/en/stable/][Emacs Prelude]]
|
- [[https://prelude.emacsredux.com/en/stable/][Emacs Prelude]]
|
||||||
- [[https://github.com/doomemacs/doomemacs][Doom Emacs]]
|
- [[https://github.com/doomemacs/doomemacs][Doom Emacs]]
|
||||||
- [[https://cce.whatthefuck.computer/cce][Ryan Rix's Complete Computing Environment]]
|
- [[https://cce.whatthefuck.computer/cce][Ryan Rix's Complete Computing Environment]]
|
||||||
|
|||||||
@@ -2,3 +2,10 @@
|
|||||||
|
|
||||||
;; Disable package.el; we use Straight.
|
;; Disable package.el; we use Straight.
|
||||||
(setq package-enable-at-startup nil)
|
(setq package-enable-at-startup nil)
|
||||||
|
|
||||||
|
;; Enable use-package statistics for the sake of start-up profiling.
|
||||||
|
(setq use-package-compute-statistics t)
|
||||||
|
|
||||||
|
(setq gc-cons-threshold
|
||||||
|
;; (4 gibibytes)
|
||||||
|
(* 4 (expt 1024 3)))
|
||||||
|
|||||||
@@ -28,6 +28,6 @@
|
|||||||
(with-current-buffer url-buffer
|
(with-current-buffer url-buffer
|
||||||
(goto-char (point-max))
|
(goto-char (point-max))
|
||||||
(eval-print-last-sexp))))
|
(eval-print-last-sexp))))
|
||||||
(load-file bootstrap-file))
|
(load bootstrap-file nil 'nomessage))
|
||||||
|
|
||||||
(setq straight-use-package-by-default t))
|
(setq straight-use-package-by-default t))
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
:commands (evilnc-comment-operator
|
:commands (evilnc-comment-operator
|
||||||
evilnc-inner-comment
|
evilnc-inner-comment
|
||||||
evilnc-outer-commenter)
|
evilnc-outer-commenter)
|
||||||
|
:defer t
|
||||||
:bind (:map evil-normal-state-map ("#" . evilnc-comment-operator)
|
:bind (:map evil-normal-state-map ("#" . evilnc-comment-operator)
|
||||||
:map evil-visual-state-map ("#" . evilnc-comment-operator)
|
:map evil-visual-state-map ("#" . evilnc-comment-operator)
|
||||||
:map evil-inner-text-objects-map ("c" . evilnc-inner-comment)
|
:map evil-inner-text-objects-map ("c" . evilnc-inner-comment)
|
||||||
@@ -101,7 +102,8 @@
|
|||||||
;; 'g=' is a bit more comfortable than 'g+', whilst preserving the analogy.
|
;; 'g=' is a bit more comfortable than 'g+', whilst preserving the analogy.
|
||||||
;; ('=' is '+' modulo shift)
|
;; ('=' is '+' modulo shift)
|
||||||
:bind (:map evil-normal-state-map ("g=" . 'evil-numbers/inc-at-pt)
|
:bind (:map evil-normal-state-map ("g=" . 'evil-numbers/inc-at-pt)
|
||||||
:map evil-normal-state-map ("g-" . 'evil-numbers/dec-at-pt)))
|
:map evil-normal-state-map ("g-" . 'evil-numbers/dec-at-pt))
|
||||||
|
:defer t)
|
||||||
|
|
||||||
;; Tree-sitter queries → Evil text objects.
|
;; Tree-sitter queries → Evil text objects.
|
||||||
(use-package evil-textobj-tree-sitter
|
(use-package evil-textobj-tree-sitter
|
||||||
@@ -121,6 +123,7 @@
|
|||||||
(use-package evil-terminal-cursor-changer
|
(use-package evil-terminal-cursor-changer
|
||||||
;; This package is only useful in the terminal.
|
;; This package is only useful in the terminal.
|
||||||
:if (not (display-graphic-p))
|
:if (not (display-graphic-p))
|
||||||
|
:defer t
|
||||||
:hook (on-first-input . evil-terminal-cursor-changer-activate))
|
:hook (on-first-input . evil-terminal-cursor-changer-activate))
|
||||||
|
|
||||||
;; Automatic alignment in region, by regexp.
|
;; Automatic alignment in region, by regexp.
|
||||||
@@ -152,6 +155,7 @@
|
|||||||
;; the text `two words`, but the point is over `two`, Evil will search for
|
;; the text `two words`, but the point is over `two`, Evil will search for
|
||||||
;; `two`. `evil-visualstar' will instead search for `two words`.
|
;; `two`. `evil-visualstar' will instead search for `two words`.
|
||||||
(use-package evil-visualstar
|
(use-package evil-visualstar
|
||||||
|
:defer t
|
||||||
:bind (:map evil-visual-state-map
|
:bind (:map evil-visual-state-map
|
||||||
("*" . evil-visualstar/begin-search-forward)))
|
("*" . evil-visualstar/begin-search-forward)))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user