Created
October 12, 2020 15:19
-
-
Save rnwolf/ed2944bb0dd023e77424769e929c428e to your computer and use it in GitHub Desktop.
Org-Roam Layer for Spacemacs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;"C:\Users\rnwol\.emacs.d\private\org-roam\packages.el" | |
(defconst org-roam-packages | |
'(org-roam)) | |
(defun org-roam/init-org-roam () | |
(use-package org-roam | |
:hook | |
(after-init . org-roam-mode) | |
:custom | |
(org-roam-directory "~/org-roam") | |
:init | |
(progn | |
(spacemacs/declare-prefix "ar" "org-roam") | |
(spacemacs/set-leader-keys | |
"arl" 'org-roam | |
"art" 'org-roam-dailies-today | |
"arm" 'org-roam-dailies-tomorrow | |
"ary" 'org-roam-dailies-yesterday | |
"arf" 'org-roam-find-file | |
"arg" 'org-roam-graph) | |
(spacemacs/declare-prefix-for-mode 'org-mode "mr" "org-roam") | |
(spacemacs/set-leader-keys-for-major-mode 'org-mode | |
"rl" 'org-roam | |
"rb" 'org-roam-switch-to-buffer | |
"rf" 'org-roam-find-file | |
"ry" 'org-roam-dailies-yesterday | |
"rm" 'org-roam-dailies-tomorrow | |
"rt" 'org-roam-dailies-today | |
"ri" 'org-roam-insert | |
"rg" 'org-roam-graph)) | |
:config | |
(setq org-roam-link-title-format "R:%s") | |
;;(setq org-roam-graph-viewer "/Applications/Firefox.app/Contents/MacOS/firefox") | |
(setq org-roam-graph-viewer "C:/Program Files/Google/Chrome/Application/chrome.exe") | |
;;(setq org-roam-graph-viewer '(lambda (file) (let ((file-file (concat "file://" file))) | |
;; (call-process "C:/Program Files/Google/Chrome/Application/chrome.exe" nil 0 nil file-file)))) | |
(setq org-roam-graph-executable "C:/Users/rnwol/scoop/shims/dot.exe") | |
(setq org-roam-graph-extra-config '(("overlap" . "false"))) | |
(setq org-roam-capture-templates | |
'(("d" "default" plain | |
(function org-roam-capture--get-point) | |
"%?" | |
:file-name "%<%Y%m%d%H%M%S>-${slug}" | |
:head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n#+OPTIONS: toc:nil\n#+LATEX_HEADER: \\usepackage[margin=1.1in]{geometry}\n#+LATEX_HEADER: \\renewcommand{\\baselinestretch}{1.25}\n\n" | |
:unnarrowed t) | |
("D" "default copy" plain | |
(function org-roam-capture--get-point) | |
"%?" | |
:file-name "%<%Y%m%d%H%M%S>-${slug}" | |
:head "#+TITLE: ${title}\n#+CREATED: %U\n#+LAST_MODIFIED: %U\n\n" | |
:unnarrowed t))))) | |
(defun org-roam/init-org-roam-bibtex () | |
(use-package org-roam-bibtex | |
:after org-roam | |
:hook (org-roam-mode . org-roam-bibtex-mode) | |
:bind (:map org-mode-map | |
(("C-c n a" . orb-note-actions))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment