summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authornoa2024-09-17 09:36:43 +0800
committernoa2024-09-17 09:36:43 +0800
commit07520a7c58666d84aea47f64b8ea51e410caf71b (patch)
tree0b00839cdc000bf3c8b1b52ce64775cb73e2cbfe /emacs
parentca3b8b6643e1218b053e09b2b66c77f806e60ada (diff)
Add deft configuration
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 5ce3dd0..7abbb29 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -1413,3 +1413,20 @@ The misspelled word is taken from OVERLAY.  WORD is the corrected word."
   ("<f12>" . howm-list-all)
   ("<C-f12>" . howm-create))
 (setopt howm-file-name-format "%Y-%m-%dT%H%M%S.md")
+
+
+;;; deft
+(require 'deft)
+(use-package deft
+  :ensure t
+  :custom
+  (deft-extensions '("md"))
+  (deft-directory "~/Documents/notes")
+  (deft-time-format nil)
+  (deft-separator " — ")
+  (deft-strip-summary-regexp
+   (concat "\\("
+           "[\n\t]" ;; blank
+           "\\|^#\\+[[:upper:]_]+:.*$" ;; org-mode metadata
+           "\\|^#+.*$" ;; markdown titles
+           "\\)")))