Add Dirvish-backed Dired workflow

This commit is contained in:
Fabio Scotto di Santolo
2026-04-12 19:33:22 +02:00
parent e2234db2ad
commit de2430316f
4 changed files with 48 additions and 6 deletions

View File

@@ -16,6 +16,7 @@
;; Tools
'tools/completion
'tools/dired
'tools/project
'tools/lsp
'tools/dap

View File

@@ -61,6 +61,10 @@
(autoload 'gptel "gptel" nil t)
(define-key fscotto/open (kbd "l") #'gptel)
;; -------- dirvish --------
(autoload 'dirvish-dwim "dirvish" nil t)
(define-key fscotto/open (kbd "d") #'dirvish-dwim)
;;;; Elfeed mode maps
(with-eval-after-load 'elfeed
(define-key elfeed-search-mode-map (kbd "w") #'elfeed-search-yank)

View File

@@ -30,6 +30,7 @@
;; Open (C-c o …)
;; --------------------------------------------------------------------------
(which-key-add-key-based-replacements
"C-c o d" "Dirvish"
"C-c o f" "RSS (Elfeed)"
"C-c o l" "LLM chat (gptel)"
"C-c o m" "mu4e (Email Client)"

View File

@@ -0,0 +1,36 @@
;;; dired.el -*- lexical-binding: t; -*-
(use-package dired
:ensure nil
:commands (dired dired-jump)
:config
(setq delete-by-moving-to-trash t
dired-dwim-target t
dired-kill-when-opening-new-dired-buffer t
dired-listing-switches
"-l --almost-all --human-readable --group-directories-first --no-group")
(put 'dired-find-alternate-file 'disabled nil))
(use-package dirvish
:ensure t
:init
(dirvish-override-dired-mode)
:custom
(dirvish-use-header-line nil)
(dirvish-use-mode-line nil)
(dirvish-hide-details nil)
(dirvish-attributes nil)
(dirvish-large-directory-threshold 20000)
:config
(with-eval-after-load 'projectile
(setq projectile-switch-project-action #'projectile-dired))
:bind
(:map dirvish-mode-map
("?" . dirvish-dispatch)
("TAB" . dirvish-subtree-toggle)
("s" . dirvish-quicksort)
("h" . dired-up-directory)))
(provide 'tools/dired)
;;; dired.el ends here