(use-package org-roam
  :ensure t
  :custom
  (org-roam-directory "~/org/notes")
  ;; Show tags in search
  (org-roam-node-display-template (concat "${title:*} " (propertize "${tags:15}" 'face 'org-tag)))
  ;; Journal notes with dailies
  (org-roam-dailies-directory "journal/")
  (org-roam-autosync-mode 1)
  (org-roam-dailies-capture-templates
      '(("d" "default" entry
         "* %?"
         :target (file+head "%<%Y-%m-%d>.org"
                            "#+title: %<%Y-%m-%d>\n#+filetags: :draft:\n"))))
  :bind
  (("C-c n f" . org-roam-node-find)
   ("C-c n i" . org-roam-node-insert)
   ("C-c n j" . org-roam-dailies-capture-today)
   ("C-c n J" . org-roam-dailies-goto-today)
  ))

(provide 'init-notes)