Skip to content

Instantly share code, notes, and snippets.

@kiranandcode
Created September 17, 2025 16:38
Show Gist options
  • Save kiranandcode/7216310a6b7989afb30f12f17f058123 to your computer and use it in GitHub Desktop.
Save kiranandcode/7216310a6b7989afb30f12f17f058123 to your computer and use it in GitHub Desktop.
Config file snippet for setting up org-roam with org-ref and org-roam-bibtex.
(use-package org-roam
:straight t
:init
(setq org-roam-directory (file-truename "~/org/roam"))
(setq org-roam-dailies-directory "daily/")
(setq org-roam-dailies-capture-templates
'(("d" "default" entry
"* %?"
:target (file+head "%<%Y-%m-%d>.org"
"#+title: %<%Y-%m-%d>\n"))))
:bind (("C-c n f" . org-roam-node-find)
("C-c n c" . org-roam-dailies-capture-today)
("C-c n r" . org-roam-node-random)
("C-c n d" . org-roam-dailies-find-today)
(:map org-mode-map
(("C-c n i" . org-roam-node-insert)
("C-c n b" . orb-insert-link)
("C-c n o" . org-id-get-create)
("C-c n t" . org-roam-tag-add)
("C-c n a" . org-roam-alias-add)
("C-c n l" . org-roam-buffer-toggle))))
:config
(org-roam-db-autosync-mode)
)
(use-package org-roam-ui :straight t)
(use-package org-roam-bibtex
:straight t
:after org-roam
:config
(org-roam-bibtex-mode)
(require 'org-ref))
(use-package org-ref
:straight t
:init
(setq reftex-default-bibliography '("~/org/research/references.bib")
org-cite-global-bibliography
(list
(expand-file-name "~/org/research/references.bib"))
org-ref-default-bibliography '("~/org/research/references.bib")
org-ref-pdf-directory "~/org/papers/"
org-ref-notes-directory "~/org/research/notes.org"
org-ref-bibliography-notes "~/org/research/notes.org"
)
(setq bibtex-completion-bibliography "~/org/research/references.bib"
bibtex-completion-library-path "~/org/papers/"
bibtex-completion-notes-path "~/org/research/notes.org")
;; :config
;; (org-ref-ivy-cite-completion)
)
(provide 'init-orgroam)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment