Optimise loading order for citar-embark

Reduce duplication in setting bibliography file variables, whilst also
being a bit more flexible
This commit is contained in:
Evie Litherland-Smith 2024-05-30 18:26:27 +01:00
parent 2e87268d59
commit 4c4c4e7882

17
init.el
View file

@ -768,15 +768,10 @@ it will be tried first."
(org-noter-prefer-root-as-file-level nil))
(use-package citar
:after org
:custom
(org-cite-global-bibliography
(citar-bibliography
(list
(expand-file-name "citar/main.bib" org-directory)))
(org-cite-insert-processor 'citar)
(org-cite-follow-processor 'citar)
(org-cite-activate-processor 'citar)
(citar-bibliography org-cite-global-bibliography)
(citar-library-paths
(list
(expand-file-name "citar/library/" org-directory)))
@ -787,8 +782,14 @@ it will be tried first."
(LaTeX-mode . citar-capf-setup)
(org-mode . citar-capf-setup)
:config
(require 'org)
(require 'nerd-icons)
(require 'citar-embark)
(setopt org-cite-insert-processor 'citar
org-cite-follow-processor 'citar
org-cite-activate-processor 'citar)
(dolist (bibfile citar-bibliography)
(add-to-list 'org-cite-global-bibliography bibfile))
(defvar citar-indicator-files-icons
(citar-indicator-create
:symbol (nerd-icons-octicon
@ -830,9 +831,11 @@ it will be tried first."
citar-indicator-cited-icons)))
(use-package citar-embark
:after (citar embark)
:after citar
:diminish
:init
(require 'embark)
:config
(citar-embark-mode +1))
(setq org-latex-compiler "lualatex")