diff --git a/emacs/init.el b/emacs/init.el index ef7e2bc..a149403 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -285,7 +285,10 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')." ;;;; Jinx (use-package jinx + :ensure t :hook (emacs-startup . global-jinx-mode) + :custom + (jinx-modes '(text-mode)) :bind ([remap transpose-chars] . jinx-correct)) ;;; Completion @@ -765,10 +768,14 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')." (use-package org-bullets :ensure t :config - (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) - ;; Eagerly load org-mode - (with-temp-buffer - (org-mode))) + (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))) + +;; Preload org-mode (and warm up text-mode hooks like jinx) after +;; packages are available on the load-path +(add-hook 'emacs-startup-hook + (lambda () + (with-temp-buffer + (org-mode)))) (defun my/org-clear-all () (interactive) @@ -853,9 +860,9 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')." :ensure t :custom (treesit-auto-install 'prompt) + :hook (prog-mode . treesit-auto-mode) :config - (treesit-auto-add-to-auto-mode-alist 'all) - (global-treesit-auto-mode)) + (treesit-auto-add-to-auto-mode-alist 'all)) ;;;; Markdown (use-package markdown-mode @@ -960,18 +967,6 @@ EMACS-ALTERNATIVE is the Emacs equivalent (e.g., 'C-s')." :custom (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 (use-package nix-mode :ensure t