Add Dirvish-backed Dired workflow

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

View File

@@ -14,12 +14,13 @@
'core/keybindings 'core/keybindings
'core/buffer 'core/buffer
;; Tools ;; Tools
'tools/completion 'tools/completion
'tools/project 'tools/dired
'tools/lsp 'tools/project
'tools/dap 'tools/lsp
'tools/treesitter 'tools/dap
'tools/treesitter
;; Languages ;; Languages
'lang/c 'lang/c

View File

@@ -61,6 +61,10 @@
(autoload 'gptel "gptel" nil t) (autoload 'gptel "gptel" nil t)
(define-key fscotto/open (kbd "l") #'gptel) (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 ;;;; Elfeed mode maps
(with-eval-after-load 'elfeed (with-eval-after-load 'elfeed
(define-key elfeed-search-mode-map (kbd "w") #'elfeed-search-yank) (define-key elfeed-search-mode-map (kbd "w") #'elfeed-search-yank)

View File

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