Fix navi behavior when path doesn't exist and autoloads

This commit is contained in:
jdormit 2024-05-06 10:02:59 -04:00
parent a9ea6b4b2f
commit 81c2ad6963
2 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,14 @@
:ensure nil
:load-path "packages/navi"
:defer t
:commands (navi
navi-by-tags
navi-matching-current-directory
navi-visit-cheat-file
navi-all-cheats
navi-cheats-for-tags
navi-cheats-matching-filename
navi-cheat-summary)
:init
(defvar-keymap embark-navi-map
:doc "Keymap for actions on Navi cheats"

View File

@ -227,6 +227,7 @@
(dirs (when navi-path (split-string navi-path ":" t " "))))
(when dirs
(dolist (file (->> dirs
(-filter #'file-directory-p)
(-map (lambda (dir) (directory-files dir t ".*\\.cheat$")))
(-flatten)
(-map (lambda (file) (navi-parse-cheat-file file registry)))))