Org roam installs every time I start emacs

I think I’ve figured it out. I never used Spacemacs until recently and I was used to Emacs init.el configurations. In short, don’t use init.el configurations in Spacemacs. I should’ve read this first:
https://thume.ca/howto/2015/03/07/configuring-spacemacs-a-tutorial/

I then stumbled upon this thread:

And configured Spacemacs as described there. The only difference was the exclusion of

(org :packages (not org-roam))

from the settings. I didn’t ignore org-roam because it didn’t work with that command. And now both org-roam and org-roam-ui are installed and working.

Here is my configuration:

   dotspacemacs-additional-packages '(
                                      sqlite3
                                      (org-roam)
                                      (org-roam-ui :location (recipe :fetcher github :repo "org-roam/org-roam-ui" :branch "main" :files ("*.el" "out")))
                                      )
(defun dotspacemacs/user-config ()

  (require 'org)
  (setq org-enable-roam-support t)

  (use-package org-roam
    :after org
    :ensure t
    :init
    (setq org-roam-v2-ack t)
    :custom
    (org-roam-directory "~/roam_notes/")  ;; change this to your folder
    (org-roam-completion-everywhere t)
    :bind (("C-c n l" . org-roam-buffer-toggle)
           ("C-c n f" . org-roam-node-find)
           ("C-c n i" . org-roam-node-insert)
           ("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)
           :map org-mode-map
           ("C-M-i" . completion-at-point)
           :map org-roam-dailies-map
           ("Y" . org-roam-dailies-capture-yesterday)
           ("T" . org-roam-dailies-capture-tomorrow))
    :bind-keymap
    ("C-c n d" . org-roam-dailies-map)
    :config
    (require 'org-roam-dailies) ;; Ensure the keymap is available
    (org-roam-db-autosync-mode))
)

1 Like