Startup time optimizations

This commit is contained in:
2026-04-20 13:57:31 -07:00
parent b0aed42312
commit 8ccb91103a

View File

@@ -285,7 +285,10 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
;;;; Jinx ;;;; Jinx
(use-package jinx (use-package jinx
:ensure t
:hook (emacs-startup . global-jinx-mode) :hook (emacs-startup . global-jinx-mode)
:custom
(jinx-modes '(text-mode))
:bind ([remap transpose-chars] . jinx-correct)) :bind ([remap transpose-chars] . jinx-correct))
;;; Completion ;;; Completion
@@ -765,10 +768,14 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
(use-package org-bullets (use-package org-bullets
:ensure t :ensure t
:config :config
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
;; Eagerly load org-mode
(with-temp-buffer ;; Preload org-mode (and warm up text-mode hooks like jinx) after
(org-mode))) ;; packages are available on the load-path
(add-hook 'emacs-startup-hook
(lambda ()
(with-temp-buffer
(org-mode))))
(defun my/org-clear-all () (defun my/org-clear-all ()
(interactive) (interactive)
@@ -853,9 +860,9 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
:ensure t :ensure t
:custom :custom
(treesit-auto-install 'prompt) (treesit-auto-install 'prompt)
:hook (prog-mode . treesit-auto-mode)
:config :config
(treesit-auto-add-to-auto-mode-alist 'all) (treesit-auto-add-to-auto-mode-alist 'all))
(global-treesit-auto-mode))
;;;; Markdown ;;;; Markdown
(use-package markdown-mode (use-package markdown-mode
@@ -960,18 +967,6 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')."
:custom :custom
(lsp-ui-sideline-show-diagnostics nil)) (lsp-ui-sideline-show-diagnostics nil))
;;;; Flycheck
(use-package flycheck
:ensure t
:init
(setq flycheck-keymap-prefix (kbd "C-c e"))
(global-flycheck-mode)
;; Elisp lint errors are annoying, so disable flycheck in elisp modes
:hook (emacs-lisp-mode . (lambda () (flycheck-mode -1)))
:bind (:repeat-map flycheck-repeat-map
("n" . flycheck-next-error)
("p" . flycheck-previous-error)))
;;;; Nix ;;;; Nix
(use-package nix-mode (use-package nix-mode
:ensure t :ensure t