From 9c2d2a60f310b3dfe804601cc4e8eac1ae68f46e Mon Sep 17 00:00:00 2001 From: Uko Kokņevičs Date: Sat, 2 Nov 2024 18:35:34 +0200 Subject: Get rid of use-package-always-defer --- init.el | 42 +++++++++--------------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index aac823d..56b0188 100644 --- a/init.el +++ b/init.el @@ -136,28 +136,22 @@ (add-hook 'before-save-hook #'delete-trailing-whitespace) ;; use-package -(use-package use-package - :custom - (use-package-always-defer t)) +(use-package use-package) ;; HIC SVNT DRACONES (use-package ace-window :straight t - :demand t :bind (([remap other-window] . ace-window) ("C-x o" . ace-window))) (use-package auto-compile :straight t - :demand t - :config - (auto-compile-on-load-mode) - (auto-compile-on-save-mode)) + :hook ((emacs-lisp-mode . auto-compile-on-load-mode) + (emacs-lisp-mode . auto-compile-on-save-mode))) (use-package battery :straight '(battery :type built-in) - :demand t :config (display-battery-mode)) @@ -177,6 +171,7 @@ (use-package centaur-tabs :straight t + ;; Demanded because we have a hook to disable the mode locally but we want it to be global ASAP :demand t :hook ((dashboard-mode . (lambda () (centaur-tabs-local-mode +1)))) :bind (("C-x " . centaur-tabs-forward) @@ -210,7 +205,6 @@ (use-package company :straight t - :demand t :custom (company-format-margin-function #'company-text-icons-margin) (company-text-face-extra-attributes '(:weight bold)) @@ -238,7 +232,6 @@ (use-package counsel :straight t - :demand t :config (counsel-mode +1)) @@ -258,7 +251,6 @@ (use-package dashboard :straight t - :demand t :hook (after-init . dashboard-setup-startup-hook) :custom (dashboard-center-content nil) @@ -271,6 +263,7 @@ (use-package display-fill-column-indicator :straight '(display-fill-column-indicator :type built-in) + ;; Demanded because we have a hook to disable the mode locally but we want it to be global ASAP :demand t :hook (dashboard-mode . (lambda () (display-fill-column-indicator-mode -1))) :config @@ -278,6 +271,7 @@ (use-package display-line-numbers :straight '(display-line-numbers :type built-in) + ;; Demanded because we have a hook to disable the mode locally but we want it to be global ASAP :demand t :hook (help-mode . (lambda () (display-line-numbers-mode -1))) :config @@ -290,7 +284,6 @@ (use-package doom-modeline :straight t - :demand t :custom (doom-modeline-icon t) (doom-modeline-height 25) @@ -299,7 +292,6 @@ (use-package doom-themes :straight t - :demand t :custom (doom-themes-enable-bold t) (doom-themes-enable-italic t) @@ -309,13 +301,11 @@ (use-package doom-themes-ext-org :after org :straight doom-themes - :demand t :config (doom-themes-org-config)) (use-package doom-themes-ext-visual-bell :straight doom-themes - :demand t :config (doom-themes-visual-bell-config))) @@ -326,7 +316,6 @@ (use-package editorconfig :straight t - :demand t :config (editorconfig-mode +1)) @@ -344,13 +333,11 @@ (use-package emojify :straight t - :demand t :config (global-emojify-mode +1)) (use-package files :straight '(files :type built-in) - :demand t :custom (major-mode-remap-alist '((c-mode . c-ts-mode) (c-or-c++-mode . c-or-c++-ts-mode) @@ -375,7 +362,6 @@ (use-package gcmh :straight t - :demand t :custom (gcmh-idle-delay 'auto) (gcmh-auto-idle-delay-factor 10) @@ -389,7 +375,6 @@ (use-package git-gutter :straight t - :demand t :config (global-git-gutter-mode +1)) @@ -405,25 +390,23 @@ (use-package hl-line :straight '(hl-line :type built-in) - :demand t :config (global-hl-line-mode +1)) (use-package hl-todo :straight t - :demand t :config (global-hl-todo-mode +1)) (use-package ibuffer :straight '(ibuffer :type built-in) - :demand t :bind (("C-x C-b" . ibuffer) ([remap list-buffers] . ibuffer))) (use-package ivy :after (counsel swiper) :straight t + ;; Demanded to enable ivy-mode globally ASAP. :demand t :bind (("C-c r" . ivy-resume) ("C-c v" . ivy-push-view) @@ -457,8 +440,7 @@ (use-package magit ;; TODO: Do some proper setup - :straight t - :demand t) + :straight t) (use-package make-mode :straight '(make-mode :type built-in) @@ -493,8 +475,7 @@ :mode ("\\.org\\'" . org-mode) :init (use-package htmlize - :straight t - :demand t) + :straight t) :custom (org-log-done t)) @@ -509,7 +490,6 @@ (use-package prog-mode :straight '(prog-mode :type built-in) - :demand t :preface (defun prepend-prettify (items) (setq prettify-symbols-alist (append items prettify-symbols-alist)) @@ -572,7 +552,6 @@ (use-package project :straight '(project :type built-in) - :demand t :init (cl-defun arkta/project-completing-read (prompt choices &key initial-input action (project (project-current t))) "Present a project tailored PROMPT with CHOICES." @@ -733,7 +712,6 @@ A thin wrapper around `xref-references-in-directory'." (use-package solaire-mode :straight t - :demand t :config (solaire-global-mode +1)) @@ -746,7 +724,6 @@ A thin wrapper around `xref-references-in-directory'." (use-package time :straight '(time :type built-in) - :demand t :custom (display-time-default-load-average nil) :config @@ -767,7 +744,6 @@ A thin wrapper around `xref-references-in-directory'." (use-package treesit :straight '(treesit :type built-in) - :demand t :config (setq treesit-extra-load-path (list (expand-file-name "tree-sitter" local-config-dir))) -- cgit v1.2.3