Skip to content

Commit

Permalink
fix(dirvish): load immediately if a directory is passed to Emacs as arg
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 17, 2023
1 parent 4b3fa3d commit 5340fd8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/me-files.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@

;;; Code:

(defconst minemacs-started-with-directory-p
(let ((args (cdr command-line-args))) (cl-some #'file-directory-p args)))

(use-package dirvish
:straight t
:hook (minemacs-after-startup . dirvish-override-dired-mode)
:demand minemacs-started-with-directory-p
:custom
(dirvish-attributes '(subtree-state nerd-icons file-size vc-state git-msg))
(dirvish-cache-dir (+directory-ensure minemacs-cache-dir "dirvish/"))
Expand All @@ -30,7 +33,9 @@
(+nvmap! :keymaps 'dirvish-mode-map
"q" #'dirvish-quit
"s" #'dirvish-subtree-toggle
"y" #'dirvish-yank-menu))
"y" #'dirvish-yank-menu)

(dirvish-override-dired-mode 1))

(use-package vlf-setup
:straight vlf
Expand Down

0 comments on commit 5340fd8

Please sign in to comment.