Refactored the org roam config
This commit is contained in:
parent
50d0dd6d22
commit
f4931fe6ca
@ -169,20 +169,11 @@ Visual fill column is a package that allows you to center text and add borders t
|
|||||||
Org-roam is a plain-text knowledge management system. It brings some of Roam's more powerful features into the Org-mode ecosystem such as org-file linking, etc.
|
Org-roam is a plain-text knowledge management system. It brings some of Roam's more powerful features into the Org-mode ecosystem such as org-file linking, etc.
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(setq jm/org-roam-directory (expand-file-name "~/Dropbox"))
|
|
||||||
(unless (file-directory-p jm/org-roam-directory)
|
|
||||||
(make-directory jm/org-roam-directory))
|
|
||||||
|
|
||||||
(setq jm/org-roam-templates-directory
|
|
||||||
(expand-file-name "templates" jm/org-roam-directory))
|
|
||||||
|
|
||||||
(unless (file-directory-p jm/org-roam-templates-directory)
|
|
||||||
(make-directory jm/org-roam-templates-directory))
|
|
||||||
|
|
||||||
(use-package org-roam
|
(use-package org-roam
|
||||||
:ensure t
|
:after org
|
||||||
:custom
|
:custom
|
||||||
(org-roam-directory jm/org-roam-directory)
|
(org-roam-directory (file-truename "~/Dropbox"))
|
||||||
:bind (("C-c n l" . org-roam-buffer-toggle)
|
:bind (("C-c n l" . org-roam-buffer-toggle)
|
||||||
("C-c n f" . org-roam-node-find)
|
("C-c n f" . org-roam-node-find)
|
||||||
("C-c n i" . org-roam-node-insert)
|
("C-c n i" . org-roam-node-insert)
|
||||||
@ -193,18 +184,21 @@ Org-roam is a plain-text knowledge management system. It brings some of Roam's m
|
|||||||
("C-c n j" . org-roam-dailies-capture-today)
|
("C-c n j" . org-roam-dailies-capture-today)
|
||||||
("C-c n k" . org-roam-dailies-capture-tomorrow))
|
("C-c n k" . org-roam-dailies-capture-tomorrow))
|
||||||
:config
|
:config
|
||||||
;; If you're using a vertical completion framework, you might want a more informative completion interface
|
;; Config for org-roam capture templates.
|
||||||
(setq org-roam-capture-templates
|
(setq jm/org-roam-templates-directory (expand-file-name "templates" org-roam-directory)
|
||||||
|
org-roam-capture-templates
|
||||||
`(("d" "Default" plain "%?"
|
`(("d" "Default" plain "%?"
|
||||||
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
|
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
|
||||||
:unnarrowed t)
|
:unnarrowed t)
|
||||||
("p" "Project" plain
|
("p" "Project" plain
|
||||||
(file ,(expand-file-name "project.org" jm/org-roam-templates-directory))
|
(file ,(expand-file-name "project.org" jm/org-roam-templates-directory))
|
||||||
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
|
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
|
||||||
|
"#+title: ${title}\n")
|
||||||
:unnarrowed t)
|
:unnarrowed t)
|
||||||
("t" "Todo Item" plain
|
("t" "Todo Item" plain
|
||||||
(file ,(expand-file-name "todo.org" jm/org-roam-templates-directory))
|
(file ,(expand-file-name "todo.org" jm/org-roam-templates-directory))
|
||||||
:target (file+head "todo/%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n")
|
:target (file+head "%<%Y%m%d%H%M%S>-${slug}.org"
|
||||||
|
"#+title: ${title}\n")
|
||||||
:unnarrowed t)))
|
:unnarrowed t)))
|
||||||
(setq org-roam-dailies-capture-templates
|
(setq org-roam-dailies-capture-templates
|
||||||
`(("d" "Default" entry "* %?" :target
|
`(("d" "Default" entry "* %?" :target
|
||||||
@ -213,9 +207,17 @@ Org-roam is a plain-text knowledge management system. It brings some of Roam's m
|
|||||||
(file ,(expand-file-name "daily.org" jm/org-roam-templates-directory))
|
(file ,(expand-file-name "daily.org" jm/org-roam-templates-directory))
|
||||||
:target (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")
|
:target (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n")
|
||||||
:unnarrowed t)))
|
:unnarrowed t)))
|
||||||
|
|
||||||
|
;; Create org roam directory and templates directory if not found.
|
||||||
|
(unless (file-directory-p org-roam-directory)
|
||||||
|
(make-directory org-roam-directory))
|
||||||
|
(unless (file-directory-p jm/org-roam-templates-directory)
|
||||||
|
(make-directory jm/org-roam-templates-directory))
|
||||||
|
|
||||||
(setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
|
(setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag)))
|
||||||
(jm/org-roam-refresh-agenda-list)
|
(org-roam-db-autosync-mode)
|
||||||
(org-roam-db-autosync-mode))
|
(jm/org-roam-refresh-agenda-list))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Fix Snippets
|
* Fix Snippets
|
||||||
|
Loading…
x
Reference in New Issue
Block a user