mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-07 06:18:59 +00:00
Create a custom Doom module for wikis
This commit is contained in:
parent
c298c621c9
commit
75de71b4d0
@ -15,7 +15,8 @@
|
|||||||
(setq doom-theme 'doom-nord)
|
(setq doom-theme 'doom-nord)
|
||||||
|
|
||||||
(setq org-directory "~/writings/orgnotes"
|
(setq org-directory "~/writings/orgnotes"
|
||||||
org-roam-directory "~/writings/wiki")
|
org-roam-directory "~/writings/wiki"
|
||||||
|
org-roam-dailies-directory (concat org-roam-directory "/daily"))
|
||||||
|
|
||||||
;; This determines the style of line numbers in effect. If set to `nil', line
|
;; This determines the style of line numbers in effect. If set to `nil', line
|
||||||
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
;; numbers are disabled. For relative line numbers, set this to `relative'.
|
||||||
@ -121,6 +122,7 @@
|
|||||||
(setq
|
(setq
|
||||||
;; Modify the time-stamp with each save.
|
;; Modify the time-stamp with each save.
|
||||||
time-stamp-format "%Y-%02m-%02d %02H:%02M:%02S %:z"
|
time-stamp-format "%Y-%02m-%02d %02H:%02M:%02S %:z"
|
||||||
|
org-id-link-to-org-use-id t
|
||||||
|
|
||||||
;; Set file templates folder at $DOOMDIR/templates.
|
;; Set file templates folder at $DOOMDIR/templates.
|
||||||
+file-templates-dir (expand-file-name "templates/" doom-private-dir)
|
+file-templates-dir (expand-file-name "templates/" doom-private-dir)
|
||||||
@ -145,18 +147,8 @@
|
|||||||
;; Automate updating timestamps on save.
|
;; Automate updating timestamps on save.
|
||||||
(add-hook! 'before-save-hook 'time-stamp)
|
(add-hook! 'before-save-hook 'time-stamp)
|
||||||
|
|
||||||
;; Set up Anki editor
|
;; Add a capture hook.
|
||||||
(use-package! anki-editor
|
(add-hook! 'org-capture-prepare-finalize-hook 'org-id-get-create)
|
||||||
:hook (org-mode . anki-editor-mode)
|
(add-hook! 'org-roam-capture-new-node-hook 'org-id-get-create)
|
||||||
:config
|
|
||||||
(setq anki-editor-create-decks 't)
|
|
||||||
(map! :localleader
|
|
||||||
:map org-mode-map
|
|
||||||
(:prefix ("C" . "Anki cards")
|
|
||||||
"p" #'anki-editor-push-notes
|
|
||||||
"r" #'anki-editor-retry-failure-notes
|
|
||||||
"i" #'anki-editor-insert-note
|
|
||||||
"I" #'anki-editor-cloze-region
|
|
||||||
"e" #'anki-editor-export-subtree-to-html)))
|
|
||||||
|
|
||||||
;;; config.el ends here
|
;;; config.el ends here
|
||||||
|
@ -14,7 +14,12 @@
|
|||||||
;; Alternatively, press 'gd' (or 'C-c g d') on a module to browse its
|
;; Alternatively, press 'gd' (or 'C-c g d') on a module to browse its
|
||||||
;; directory (for easy access to its source code).
|
;; directory (for easy access to its source code).
|
||||||
|
|
||||||
(doom! :input
|
(doom!
|
||||||
|
;; All custom modules will be put here.
|
||||||
|
:tools
|
||||||
|
(wiki +anki)
|
||||||
|
|
||||||
|
:input
|
||||||
;;chinese
|
;;chinese
|
||||||
japanese
|
japanese
|
||||||
|
|
||||||
@ -146,8 +151,7 @@
|
|||||||
+journal
|
+journal
|
||||||
+noter
|
+noter
|
||||||
+pandoc
|
+pandoc
|
||||||
+present
|
+present) ; organize your plain life in plain text
|
||||||
+roam) ; organize your plain life in plain text
|
|
||||||
raku ; write code no one else can comprehend
|
raku ; write code no one else can comprehend
|
||||||
;;php ; perl's insecure younger brother
|
;;php ; perl's insecure younger brother
|
||||||
;;plantuml ; diagrams for confusing people more
|
;;plantuml ; diagrams for confusing people more
|
||||||
@ -183,6 +187,4 @@
|
|||||||
|
|
||||||
:config
|
:config
|
||||||
;;literate
|
;;literate
|
||||||
(default +bindings +smartparens)
|
(default +bindings +smartparens))
|
||||||
)
|
|
||||||
|
|
||||||
|
42
emacs/modules/tools/wiki/config.el
Normal file
42
emacs/modules/tools/wiki/config.el
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
;;; tools/wiki/config.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;; My custom configuration for setting up my personal wiki.
|
||||||
|
;; Also a good opportunity for training my Elisp-fu.
|
||||||
|
|
||||||
|
(use-package! org-roam
|
||||||
|
:hook (org-load . org-roam-mode)
|
||||||
|
:commands
|
||||||
|
(org-roam-buffer
|
||||||
|
org-roam-setup
|
||||||
|
org-roam-capture
|
||||||
|
org-roam-node-find)
|
||||||
|
:preface (defvar org-roam-directory nil)
|
||||||
|
:config
|
||||||
|
(setq org-roam-completion-everywhere t)
|
||||||
|
(org-roam-setup)
|
||||||
|
(map! :leader
|
||||||
|
(:prefix ("n r" . "org-roam")
|
||||||
|
:desc "Go to a random node in your Roam database" "R" #'org-roam-node-random
|
||||||
|
:desc "Find node" "f" #'org-roam-node-find
|
||||||
|
:desc "Org Roam capture" "c" #'org-roam-capture
|
||||||
|
:desc "Org Roam setup" "s" #'org-roam-setup
|
||||||
|
:desc "Org Roam teardown" "S" #'org-roam-teardown
|
||||||
|
:desc "Open backlinks buffer" "b" #'org-roam-buffer-toggle
|
||||||
|
|
||||||
|
(:prefix ("d" . "dailies")
|
||||||
|
:desc "Dailies for today" "t" #'org-roam-dailies-find-today
|
||||||
|
:desc "Dailies for a specific date" "d" #'org-roam-dailies-find-date
|
||||||
|
:desc "Dailies for yesterday" "y" #'org-roam-dailies-find-yesterday))))
|
||||||
|
|
||||||
|
(use-package! anki-editor
|
||||||
|
:hook (org-mode . anki-editor-mode)
|
||||||
|
:config
|
||||||
|
(setq anki-editor-create-decks 't)
|
||||||
|
(map! :localleader
|
||||||
|
:map org-mode-map
|
||||||
|
(:prefix ("C" . "Anki cards")
|
||||||
|
"p" #'anki-editor-push-notes
|
||||||
|
"r" #'anki-editor-retry-failure-notes
|
||||||
|
"i" #'anki-editor-insert-note
|
||||||
|
"I" #'anki-editor-cloze-region
|
||||||
|
"e" #'anki-editor-export-subtree-to-html)))
|
5
emacs/modules/tools/wiki/doctor.el
Normal file
5
emacs/modules/tools/wiki/doctor.el
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||||
|
;;; tools/wiki/doctor.el
|
||||||
|
|
||||||
|
(unless (executable-find "sqlite3")
|
||||||
|
warn! "Couldn't find SQLite executable. org-roam will not work.")
|
20
emacs/modules/tools/wiki/packages.el
Normal file
20
emacs/modules/tools/wiki/packages.el
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
;; -*- no-byte-compile: t; -*-
|
||||||
|
;;; tools/wiki
|
||||||
|
|
||||||
|
;; The main package for creating a wiki.
|
||||||
|
(package! org-roam
|
||||||
|
:recipe (:host github :repo "org-roam/org-roam" :branch "v2"))
|
||||||
|
|
||||||
|
(when (featurep! +anki)
|
||||||
|
(package! anki-editor
|
||||||
|
:recipe (:host github
|
||||||
|
:repo "louietan/anki-editor")
|
||||||
|
:pin "546774a453ef4617b1bcb0d1626e415c67cc88df"))
|
||||||
|
|
||||||
|
;;(when (featurep! +markdown)
|
||||||
|
;; (package! md-roam
|
||||||
|
;; :recipe (:host github :repo "nobiot/md-roam" :branch "v2")))
|
||||||
|
;;
|
||||||
|
;;(when (featurep! +dendron)
|
||||||
|
;; (package! dendroam
|
||||||
|
;; :recipe (:host github :repo "vicrdguez/dendroam")))
|
@ -51,25 +51,5 @@
|
|||||||
;;;;;;;;;;;;
|
;;;;;;;;;;;;
|
||||||
; PACKAGES ;
|
; PACKAGES ;
|
||||||
;;;;;;;;;;;;
|
;;;;;;;;;;;;
|
||||||
;;(package! flycheck-vale)
|
|
||||||
(package! org-roam-bibtex
|
|
||||||
:recipe (:host github
|
|
||||||
:repo "org-roam/org-roam-bibtex"))
|
|
||||||
|
|
||||||
;; Inline errors? Hoorah!
|
;; Inline errors? Hoorah!
|
||||||
(package! flycheck-inline)
|
(package! flycheck-inline)
|
||||||
|
|
||||||
;; Since org-roam-bibtex is a connector to all of the specified packages and in alpha stage, it can be problematic so we'll disable it for now.
|
|
||||||
;(unpin! org-roam company-org-roam)
|
|
||||||
|
|
||||||
; A minimap in case you have Stockholm Syndrome for your bloated IDEs. :)
|
|
||||||
(package! minimap
|
|
||||||
:recipe (:host github
|
|
||||||
:repo "dengste/minimap")
|
|
||||||
:pin "8bc9a65825925a7c58b83ad389f07a93f22d60f3")
|
|
||||||
|
|
||||||
; Anki
|
|
||||||
(package! anki-editor
|
|
||||||
:recipe (:host github
|
|
||||||
:repo "louietan/anki-editor")
|
|
||||||
:pin "546774a453ef4617b1bcb0d1626e415c67cc88df")
|
|
||||||
|
Loading…
Reference in New Issue
Block a user