;;; packages.el --- org-roam layer packages file for Spacemacs. ;; ;; Copyright (c) 2012-2017 Sylvain Benner & Contributors ;; ;; Author: root ;; URL: https://github.com/syl20bnr/spacemacs ;; ;; This file is not part of GNU Emacs. ;; ;;; License: GPLv3 ;;; Commentary: ;; See the Spacemacs documentation and FAQs for instructions on how to implement ;; a new layer: ;; ;; SPC h SPC layers RET ;; ;; ;; Briefly, each package to be installed or configured by this layer should be ;; added to `org-roam-packages'. Then, for each package PACKAGE: ;; ;; - If PACKAGE is not referenced by any other Spacemacs layer, define a ;; function `org-roam/init-PACKAGE' to load and initialize the package. ;; - Otherwise, PACKAGE is already referenced by another Spacemacs layer, so ;; define the functions `org-roam/pre-init-PACKAGE' and/or ;; `org-roam/post-init-PACKAGE' to customize the package as it is loaded. ;;; Code: (defconst org-roam-packages '( emacsql emacsql-lite org-roam ) ) (defun org-roam/init-org-roam () (use-package org-roam :hook (after-init . org-roam-mode) :custom (org-roam-directory "/mnt/host/perso/roam-notes/") :init (progn (spacemacs/declare-prefix "ar" "org-roam") (spacemacs/set-leader-keys "arl" 'org-roam "art" 'org-roam-today "arf" 'org-roam-find-file "arg" 'org-roam-show-graph) (spacemacs/declare-prefix-for-mode 'org-mode "mr" "org-roam") (spacemacs/set-leader-keys-for-major-mode 'org-mode "rl" 'org-roam "rt" 'org-roam-today "rb" 'org-roam-switch-to-buffer "rf" 'org-roam-find-file "ri" 'org-roam-insert "rg" 'org-roam-show-graph))))