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:
parent
0fc32ed881
commit
2b2901593e
1 changed files with 18 additions and 23 deletions
|
@ -3,9 +3,7 @@
|
||||||
;;
|
;;
|
||||||
;;; `org-cite'
|
;;; `org-cite'
|
||||||
|
|
||||||
(use-package! oc
|
(after! oc
|
||||||
:defer t
|
|
||||||
:config
|
|
||||||
(setq org-cite-global-bibliography
|
(setq org-cite-global-bibliography
|
||||||
(ensure-list
|
(ensure-list
|
||||||
(or (bound-and-true-p citar-bibliography)
|
(or (bound-and-true-p citar-bibliography)
|
||||||
|
@ -13,16 +11,30 @@
|
||||||
;; Setup export processor; default csl/citeproc-el, with biblatex for
|
;; Setup export processor; default csl/citeproc-el, with biblatex for
|
||||||
;; latex
|
;; latex
|
||||||
org-cite-export-processors '((latex biblatex) (t csl))
|
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
|
(use-package! citar
|
||||||
:when (modulep! :completion vertico)
|
:when (modulep! :completion vertico)
|
||||||
:no-require
|
:defer t
|
||||||
:config
|
:init
|
||||||
(setq org-cite-insert-processor 'citar
|
(setq org-cite-insert-processor 'citar
|
||||||
org-cite-follow-processor 'citar
|
org-cite-follow-processor 'citar
|
||||||
org-cite-activate-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)
|
(when (modulep! :completion vertico +icons)
|
||||||
(defvar citar-indicator-files-icons
|
(defvar citar-indicator-files-icons
|
||||||
(citar-indicator-create
|
(citar-indicator-create
|
||||||
|
@ -65,23 +77,6 @@
|
||||||
citar-indicator-notes-icons
|
citar-indicator-notes-icons
|
||||||
citar-indicator-cited-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
|
;;; Third-party
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue