about summary refs log tree commit diff
path: root/users/sterni
diff options
context:
space:
mode:
Diffstat (limited to 'users/sterni')
-rw-r--r--users/sterni/emacs/default.nix1
-rw-r--r--users/sterni/emacs/init.el10
2 files changed, 11 insertions, 0 deletions
diff --git a/users/sterni/emacs/default.nix b/users/sterni/emacs/default.nix
index a66f9ca1529c..dfc1aab6a457 100644
--- a/users/sterni/emacs/default.nix
+++ b/users/sterni/emacs/default.nix
@@ -23,6 +23,7 @@ let
     epkgs.elpaPackages.which-key
     epkgs.melpaPackages.adoc-mode
     epkgs.melpaPackages.cmake-mode
+    epkgs.melpaPackages.deft
     epkgs.melpaPackages.direnv
     epkgs.melpaPackages.dockerfile-mode
     epkgs.melpaPackages.editorconfig
diff --git a/users/sterni/emacs/init.el b/users/sterni/emacs/init.el
index c38daa109ce5..eaca20a02d63 100644
--- a/users/sterni/emacs/init.el
+++ b/users/sterni/emacs/init.el
@@ -337,6 +337,16 @@
   (set-face-background 'languagetool-issue-default "yellow")
   (set-face-background 'languagetool-issue-misspelling "red"))
 
+(use-package deft
+  :config
+  ;; This is based on (car deft-extensions), but unfortunately the variable is
+  ;; not re-bound in the hook defined by defcustom, so it is always "txt".
+  (setq deft-default-extension "org")
+  (evil-define-key 'normal 'global (kbd "<leader>mn") 'deft)
+  :custom
+  deft-directory (expand-file-name "~/files/sync/org/notes")
+  deft-extensions '("org" "md" "txt" "tex"))
+
 (unless (server-running-p)
   (server-start))