Add back :commands and use :hook for org-roam

This commit is contained in:
James Ravn 2020-04-08 21:24:49 +01:00
parent 82312ac9aa
commit 8ecf393a3a
No known key found for this signature in database
GPG key ID: 52C372C72159D6EE

View file

@ -2,7 +2,17 @@
;;;###if (featurep! +roam) ;;;###if (featurep! +roam)
(use-package! org-roam (use-package! org-roam
:after org :hook (org-load . org-roam-mode)
:commands (org-roam
org-roam-capture
org-roam-date
org-roam-find-file
org-roam-graph-show
org-roam-insert
org-roam-switch-to-buffer
org-roam-today
org-roam-tomorrow
org-roam-yesterday)
:preface :preface
;; Set this to nil so we can later detect whether the user has set a custom ;; Set this to nil so we can later detect whether the user has set a custom
;; directory for it, and default to `org-directory' if they haven't. ;; directory for it, and default to `org-directory' if they haven't.
@ -24,8 +34,7 @@
:desc "Yesterday" "y" #'org-roam-yesterday)) :desc "Yesterday" "y" #'org-roam-yesterday))
:config :config
(unless org-roam-directory (unless org-roam-directory
(setq org-roam-directory org-directory)) (setq org-roam-directory org-directory)))
(org-roam-mode +1))
;; Since the org module lazy loads org-protocol (waits until an org URL is ;; Since the org module lazy loads org-protocol (waits until an org URL is