doomemacs/modules/ui/deft/config.el
Henrik Lissner 76cacb5bfe
💥 Rename def-package! -> use-package!
Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
2019-07-23 12:50:45 +02:00

32 lines
1.1 KiB
EmacsLisp

;;; ui/deft/config.el -*- lexical-binding: t; -*-
(use-package! deft
:commands deft
:init
(setq deft-extensions '("org" "md" "tex" "txt")
deft-default-extension "org"
;; de-couples filename and note title:
deft-use-filename-as-title nil
deft-use-filter-string-for-filename t
deft-org-mode-title-prefix t
;; converts the filter string into a readable file-name using kebab-case:
deft-file-naming-rules
'((noslash . "-")
(nospace . "-")
(case-fn . downcase)))
:config
;; start filtering immediately
(set-evil-initial-state! 'deft-mode 'insert)
(map! :map deft-mode-map
:localleader
"RET" #'deft-new-file-named
"a" #'deft-archive-file
"c" #'deft-filter-clear
"d" #'deft-delete-file
"f" #'deft-find-file
"g" #'deft-refresh
"l" #'deft-filter
"n" #'deft-new-file
"r" #'deft-rename-file
"s" #'deft-toggle-sort-method
"t" #'deft-toggle-incremental-search))