Skip to content

Commit

Permalink
Merge pull request doomemacs#6568 from Dadams2:master
Browse files Browse the repository at this point in the history
  • Loading branch information
David Adams authored and thaenalpha committed Aug 10, 2022
2 parents e98a339 + b0e775d commit c719c12
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
24 changes: 17 additions & 7 deletions modules/emacs/dired/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Fixes #3939: unsortable dired entries on Windows."

(use-package! diff-hl
:when (featurep! :ui vc-gutter)
:unless (featurep! +dirvish)
:hook (dired-mode-hook . diff-hl-margin-local-mode)
:init
(unless (featurep! :ui vc-gutter +diff-hl)
Expand Down Expand Up @@ -138,26 +139,35 @@ we have to clean it up ourselves."


(use-package! dirvish
:when (featurep! +dirvish)
:defer t
:init (after! dired (dirvish-override-dired-mode))
:hook (dired-mode . dired-omit-mode)
:when (featurep! +dirvish)
:init (dirvish-override-dired-mode)
:config
(when (featurep! :ui tabs)
(after! centaur-tabs
(add-hook! 'dirvish-mode-hook 'centaur-tabs-local-mode)))
(setq dirvish-cache-dir (concat doom-cache-dir "dirvish/")
dirvish-hide-details nil
dirvish-attributes '(git-msg)
dired-omit-files (concat dired-omit-files "\\|^\\..*$"))
dirvish-attributes '(git-msg vc-state file-size))
(setq dirvish-mode-line-format
'(:left (sort file-time " " file-size symlink) :right (omit yank index)))
(when (featurep! +icons)
(push 'all-the-icons dirvish-attributes))
;; (when (featurep! ui: tabs)
;; (add-hook! 'dirvish-mode-hook (centaur-tabs-local-mode)))
(map! :map dirvish-mode-map
:n "b" #'dirvish-goto-bookmark
:n "z" #'dirvish-show-history
:n "f" #'dirvish-file-info-menu
:n "F" #'dirvish-toggle-fullscreen
:n "l" #'dired-find-file
:n "h" #'dired-up-directory
:n "?" #'dirvish-dispatch
:n "q" #'dirvish-quit
:localleader
"h" #'dired-omit-mode))
"h" #'dired-omit-mode)
(global-set-key [remap find-dired] #'dirvish-fd)
(set-popup-rule! "^ \\*Dirvish.*" :ignore t))


(use-package! all-the-icons-dired
Expand Down Expand Up @@ -185,7 +195,6 @@ we have to clean it up ourselves."


(use-package! dired-x
:unless (featurep! +dirvish)
:unless (featurep! +ranger)
:hook (dired-mode . dired-omit-mode)
:config
Expand Down Expand Up @@ -222,6 +231,7 @@ we have to clean it up ourselves."

(use-package! fd-dired
:when doom-projectile-fd-binary
:unless (featurep! +dirvish)
:defer t
:init
(global-set-key [remap find-dired] #'fd-dired)
Expand Down
2 changes: 1 addition & 1 deletion modules/emacs/dired/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
(when (featurep! +ranger)
(package! ranger :pin "2498519cb21dcd5791d240607a72a204d1761668"))
(when (featurep! +dirvish)
(package! dirvish :pin "73dcaa404da9ab84d25f2919e6e3af4b1f8e7f37"))
(package! dirvish :pin "86b7002d3b035b1a314775db5ff1946e29bd33ef"))
(when (and (featurep! +icons)
(not (featurep! +dirvish)))
(package! all-the-icons-dired :pin "5e9b097f9950cc9f86de922b07903a4e5fefc733"))
Expand Down

0 comments on commit c719c12

Please sign in to comment.