;; -*- lexical-binding: t; -*- ;; Make Dired even better (use-package dired :straight (:type built-in) :config (evil-collection-dired-setup)) ;; Add a toggleable dired sidebar (use-package dired-sidebar :config (defun winum-assign-0-to-dired-sidebar () (when (equal major-mode 'dired-sidebar-mode) 0)) (add-to-list 'winum-assign-functions #'winum-assign-0-to-dired-sidebar) (add-hook 'dired-sidebar-mode-hook (lambda () (unless (file-remote-p default-directory) (auto-revert-mode)))) (add-hook 'dired-sidebar-mode-hook #'hide-mode-line-mode) (add-hook 'dired-sidebar-mode-hook (lambda () (display-line-numbers-mode -1))) :general (leader-map "d" #'dired-sidebar-toggle-sidebar) :custom (dired-sidebar-theme 'nerd) (dired-sidebar-should-follow-file t) (dired-sidebar-pop-to-sidebar-on-toggle-open nil) (dired-sidebar-no-delete-other-windows t)) (provide 'init-dired)