Add org-roam

This commit is contained in:
Jeremy Dormitzer 2020-02-16 10:35:51 -05:00
parent b631c35a26
commit 7fb7379c12

View File

@ -1985,6 +1985,51 @@ Quickly find stuff in Org files:
((normal visual motion) org-noter-doc-mode-map "C-M-." #'org-noter-sync-current-note))
#+END_SRC
* Org Roam
[[https://org-roam.readthedocs.io/en/develop/][Org-roam]] is another backlink package for org-mode:
#+BEGIN_SRC emacs-lisp
(use-package org-roam
:after org
:straight (:host github :repo "jethrokuan/org-roam" :branch "develop")
:commands
(org-roam
org-roam-today
org-roam-find-file
org-roam-insert
org-roam-show-graph
org-roam--build-cache-async
org-roam--get-new-id)
:hook
(org-mode . org-roam-mode)
(after-init . org-roam--build-cache-async)
:custom
(org-roam-directory (concat (get-dropbox-directory) "/org"))
:init
(leader-def-key "fo" #'org-roam-find-file)
(leader-def-key "of" #'org-roam-find-file)
(defvar org-roam-map (make-sparse-keymap))
(which-key-add-key-based-replacements "C-c n" "org-roam")
(which-key-add-major-mode-key-based-replacements
'org-mode "gn" "org-roam")
(defun org-roam-new-filename ()
"Creates a new org-roam filename"
(concat org-roam-directory
"/"
(org-roam--get-new-id)
".org"))
(add-to-list 'org-capture-templates
'("r" "Roam" plain (file org-roam-new-filename)
"#+TITLE: %^{Title}\n\n%?"))
:general
(org-roam-map "l" #'org-roam)
(org-roam-map "t" #'org-roam-today)
(org-roam-map "f" #'org-roam-find-file)
(org-roam-map "i" #'org-roam-insert)
(org-roam-map "g" #'org-roam-show-graph)
((normal motion visual) org-mode-map "gn" org-roam-map)
("C-c n" org-roam-map))
#+END_SRC
* Projectile
#+BEGIN_SRC emacs-lisp
(use-package projectile