refactor(biblio): tidy use-package usage

:after can be misleading, so avoid it. :no-require is for working around
byte compilation issues; deferral is sufficient here.

Ref: https://github.com/jwiegley/use-package/issues/829
This commit is contained in:
Liam Hupfer 2024-03-03 23:55:40 -06:00 committed by Yann Esposito (Yogsototh)
parent d437f34e9f
commit 84086e532d
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646

View file

@ -3,9 +3,7 @@
;;
;;; `org-cite'
(use-package! oc
:defer t
:config
(after! oc
(setq org-cite-global-bibliography
(ensure-list
(or (bound-and-true-p citar-bibliography)
@ -13,16 +11,30 @@
;; Setup export processor; default csl/citeproc-el, with biblatex for
;; latex
org-cite-export-processors '((latex biblatex) (t csl))
org-support-shift-select t))
org-support-shift-select t)
(require 'oc-biblatex))
;; oc-csl requires citeproc, which requires the top-level org, so loading oc-csl
;; after oc interferes with incremental loading of Org
(after! org (require 'oc-csl))
(use-package! citar
:when (modulep! :completion vertico)
:no-require
:config
:defer t
:init
(setq org-cite-insert-processor 'citar
org-cite-follow-processor 'citar
org-cite-activate-processor 'citar)
:config
(after! embark
(citar-embark-mode))
(after! org-roam
(citar-org-roam-mode))
(when (modulep! :completion vertico +icons)
(defvar citar-indicator-files-icons
(citar-indicator-create
@ -65,23 +77,6 @@
citar-indicator-notes-icons
citar-indicator-cited-icons))))
(use-package! citar-embark
:when (modulep! :completion vertico)
:after citar embark
:config (citar-embark-mode))
(use-package! citar-org-roam
:when (and (modulep! +roam2)
(modulep! :completion vertico))
:after citar org-roam
:config (citar-org-roam-mode))
;; `org-cite' processors
(use-package! oc-biblatex :after oc)
;; oc-csl requires citeproc, which requires the top-level org, so loading oc-csl
;; after oc interferes with incremental loading of Org
(use-package! oc-csl :after org)
;;
;;; Third-party