2023-03-11 11:01:07 -05:00
|
|
|
;;; obsidian-config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;; configure obsidian integration for note taking fun times
|
|
|
|
(use-package! obsidian
|
|
|
|
:config
|
|
|
|
(global-obsidian-mode t)
|
2025-02-26 22:11:09 -05:00
|
|
|
;;(obsidian-backlinks-mode t)
|
2025-02-21 16:45:37 -05:00
|
|
|
:custom
|
|
|
|
(obsidian-directory "~/Documents/Obsidian/Primary/")
|
|
|
|
(setq obsidian-inbox-directory "_Inbox")
|
|
|
|
(markdown-enable-wiki-links t)
|
2023-03-11 11:01:07 -05:00
|
|
|
(map! :map obsidian-mode-map
|
2023-03-13 10:25:02 -04:00
|
|
|
"C-c C-o" #'obsidian-follow-link-at-point
|
|
|
|
"C-c C-b" #'obsidian-backlink-jump
|
|
|
|
"C-c C-l" #'obsidian-insert-wikilink)
|
2024-07-03 11:53:10 -04:00
|
|
|
|
2023-03-11 11:01:07 -05:00
|
|
|
;; custom quick capture template for obsidian daily note
|
|
|
|
(defun mnl/obsidian-capture ()
|
|
|
|
"Create new obsidian note. In the `obsidian-inbox-directory' if set otherwise in `obsidian-directory' root."
|
|
|
|
(interactive)
|
|
|
|
(let* ((title (read-from-minibuffer "Title: " (format-time-string "%Y-%m-%d")))
|
2024-09-16 22:42:30 -04:00
|
|
|
(filename (s-concat obsidian-directory "_Journal/" title ".md"))
|
2023-03-13 10:25:02 -04:00
|
|
|
(clean-filename (s-replace "//" "/" filename)))
|
2024-07-04 14:42:42 -04:00
|
|
|
(find-file (expand-file-name clean-filename) t))))
|