use dirvish file manager; dirvish and magit vterm commands

This commit is contained in:
MitchMarq42 2022-07-17 10:50:11 -08:00
parent d10fcaf8c8
commit 534b8ccba3

View File

@ -43,14 +43,6 @@
:commands ibuffer :commands ibuffer
:custom :custom
(ibuffer-use-other-window t)) (ibuffer-use-other-window t))
(use-package dired
:straight (:type built-in)
:commands dired
:custom
(dired-always-read-filesystem t)
(dired-vc-rename-file t)
:hook (dired-mode . dired-hide-details-mode)
(dired-mode . wdired-mode))
(use-package image-mode (use-package image-mode
:straight (:type built-in) :straight (:type built-in)
:config :config
@ -113,6 +105,33 @@
:if (< (string-to-number emacs-version) 28) :if (< (string-to-number emacs-version) 28)
:diminish) :diminish)
(use-package all-the-icons)
(use-package dirvish
:straight (:files (:defaults "extensions/*.el"))
:commands 'dirvish
:init (dirvish-override-dired-mode)
(setq dirvish-attributes '(all-the-icons collapse))
(dirvish-define-preview exa (file)
"Use `exa' to generate directory preview."
:require ("exa") ; tell Dirvish to check if we have the executable
(when (file-directory-p file) ; we only interest in directories here
`(shell . ("exa" "--color=always" "-al" ,file)))) ; use the command output as preview
(add-to-list 'dirvish-preview-dispatchers 'exa)
(setq dired-listing-switches "-l --almost-all")
:hook (dirvish-mode . turn-off-line-numbers)
:general
(general-define-key
:states 'normal
:keymaps '(dirvish-mode-map local)
"h" 'dired-up-directory
"l" 'dired-find-file
"/" 'dirvish-narrow)
(general-define-key
:states 'normal
:prefix-command 'file-tree-map-prefix
:prefix-map 'file-tree-map
:prefix "SPC t"
"t" 'dirvish-side))
;; Completion framework... ;; Completion framework...
;; (use-package ivy ;; (use-package ivy
;; :diminish ;; :diminish
@ -230,6 +249,8 @@
"find-file-other-frame" "find-file-other-frame"
"eshell/emacs" "eshell/emacs"
"eshell/man" "eshell/man"
"dirvish"
"magit"
"info-other-window" "info-other-window"
"add-vterm-eval-cmd")) "add-vterm-eval-cmd"))
(defun add-vterm-eval-cmd (function) (defun add-vterm-eval-cmd (function)
@ -493,22 +514,22 @@
:commands esup) :commands esup)
;; Blingy file tree view ;; Blingy file tree view
(use-package treemacs ;; (use-package treemacs
:general (general-define-key ;; :general (general-define-key
:states 'normal ;; :states 'normal
:prefix-command 'treemacs-map-prefix ;; :prefix-command 'treemacs-map-prefix
:prefix-map 'treemacs-map ;; :prefix-map 'treemacs-map
:prefix "SPC t" ;; :prefix "SPC t"
"t" 'treemacs) ;; "t" 'treemacs)
:config ;; :config
(treemacs-project-follow-mode) ;; (treemacs-project-follow-mode)
(treemacs-git-mode 'simple) ;; (treemacs-git-mode 'simple)
:hook ;; :hook
(treemacs-mode . turn-off-line-numbers)) ;; (treemacs-mode . turn-off-line-numbers))
(use-package treemacs-evil ;; (use-package treemacs-evil
:after treemacs) ;; :after treemacs)
(use-package treemacs-all-the-icons ;; (use-package treemacs-all-the-icons
:after treemacs) ;; :after treemacs)
;; Blingy laggy minimap on the right ;; Blingy laggy minimap on the right
(use-package minimap (use-package minimap