Henrik Lissner 2020-10-11 16:33:25 -04:00
parent 8a45b4671e
commit ea575e3a8d
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 19 additions and 32 deletions

View file

@ -39,12 +39,15 @@
:config
(setq org-roam-directory
(file-name-as-directory
(expand-file-name (or org-roam-directory "roam")
org-directory))
(file-truename
(expand-file-name (or org-roam-directory "roam")
org-directory)))
org-roam-db-location (concat org-roam-directory ".org-roam.db")
org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU
;; Make org-roam buffer sticky; i.e. don't replace it when opening a
;; file with an *-other-window command.
org-roam-buffer-window-parameters '((no-delete-other-windows . t))
org-roam-completion-everywhere t
org-roam-completion-system
(cond ((featurep! :completion helm) 'helm)
((featurep! :completion ivy) 'ivy)
@ -65,27 +68,11 @@
(org-roam-buffer--get-create)))))
;; Hide the mode line in the org-roam buffer, since it serves no purpose. This
;; makes it easier to distinguish among other org buffers.
(add-hook 'org-roam-buffer-prepare-hook #'hide-mode-line-mode)
;; REVIEW Fixes an unhelpful "wrong-type-argument: stringp" error which occurs
;; if sqlite3 isn't installed. Remove this once addressed upstream.
(defadvice! +org-fail-gracefully-when-sqlite-is-absent-a (orig-fn &rest args)
:around #'org-roam-mode
(let ((emacsql-sqlite3-executable
(or (bound-and-true-p emacsql-sqlite3-executable)
"sqlite3")))
(apply orig-fn args))))
;; makes it easier to distinguish from other org buffers.
(add-hook 'org-roam-buffer-prepare-hook #'hide-mode-line-mode))
;; Since the org module lazy loads org-protocol (waits until an org URL is
;; detected), we can safely chain `org-roam-protocol' to it.
(use-package! org-roam-protocol
:after org-protocol)
(use-package! company-org-roam
:when (featurep! :completion company)
:after org-roam
:config
(set-company-backend! 'org-mode '(company-org-roam company-yasnippet company-dabbrev)))