chore(config): Refactor Emacs configuration with multiple improvements
- Replace projectile with built-in project.el - Add cal-china-x for Chinese lunar calendar support - Add dired-gitignore integration with dirvish - Add mwim for smarter line navigation - Add keycast mode for key display - Add ef-themes theme collection - Improve corfu terminal handling for Emacs 31+ - Add gptel-agent-project and consult-ripgrep-project helpers - Remove custom.el from repo, support init-local.el for local config - Update theme faces for transient, keycast, and calendar holidays - Various keybinding additions and cleanup
This commit is contained in:
@@ -4,30 +4,35 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
(setq dired-dwim-target t)
|
||||
|
||||
(use-package dired
|
||||
:straight nil
|
||||
:config
|
||||
(when *is-mac*
|
||||
(setq insert-directory-program "gls")
|
||||
(setq dired-use-ls-dired t)))
|
||||
(setq insert-directory-program "gls"
|
||||
dired-use-ls-dired t))
|
||||
(setq dired-dwim-target t
|
||||
dired-listing-switches
|
||||
"-l --almost-all --human-readable --group-directories-first --no-group"
|
||||
dired-recursive-deletes 'always
|
||||
dired-recursive-copies 'always)
|
||||
(put 'dired-find-alternate-file 'disabled nil))
|
||||
|
||||
;; dirvish
|
||||
(use-package dirvish
|
||||
:hook
|
||||
(dired-mode-hook . denote-dired-mode)
|
||||
|
||||
:init
|
||||
(dirvish-override-dired-mode)
|
||||
|
||||
:config
|
||||
(require 'vc)
|
||||
(if *is-windows* (require 'fix-dirvish-preview))
|
||||
|
||||
(if (or *is-mac* *is-android*)
|
||||
(setq dirvish-hide-details t)
|
||||
(setq dirvish-hide-details '(dirvish-side)))
|
||||
(setq dirvish-use-mode-line 'global)
|
||||
(setq dirvish-use-mode-line t)
|
||||
|
||||
(unless *is-windows*
|
||||
(setq dirvish-attributes '(file-time file-size)))
|
||||
@@ -75,18 +80,36 @@
|
||||
("g" "~/gptel/" "gptel sessions")))
|
||||
(t nil))))
|
||||
|
||||
;; gitignore
|
||||
(use-package dired-gitignore
|
||||
:after
|
||||
(dirvish dirvish-vc transient)
|
||||
:demand t
|
||||
:config
|
||||
(transient-define-suffix dirvish-toggle-gitignore ()
|
||||
"Toggle `dired-gitignore-mode' in current Dirvish buffer."
|
||||
:description
|
||||
(lambda ()
|
||||
(format "Gitignore filter (%s)"
|
||||
(if dired-gitignore-mode
|
||||
(propertize "+" 'face 'transient-value)
|
||||
(propertize "-" 'face 'transient-inactive-value))))
|
||||
:transient t
|
||||
(interactive)
|
||||
(dired-gitignore-mode 'toggle))
|
||||
|
||||
(transient-append-suffix 'dirvish-vc-menu "v"
|
||||
'("i" dirvish-toggle-gitignore)))
|
||||
|
||||
;; trashed
|
||||
(use-package trashed
|
||||
:commands
|
||||
(trashed)
|
||||
:config
|
||||
(setq trashed-action-confirmer 'y-or-n-p)
|
||||
(setq trashed-use-header-line t)
|
||||
(setq trashed-sort-key '("Date deleted" . t))
|
||||
(setq trashed-date-format "%Y-%m-%d %H:%M:%S"))
|
||||
|
||||
(setq dired-listing-switches
|
||||
"-l --almost-all --human-readable --group-directories-first --no-group")
|
||||
(put 'dired-find-alternate-file 'disabled nil)
|
||||
(setq trashed-action-confirmer 'y-or-n-p
|
||||
trashed-use-header-line t
|
||||
trashed-sort-key '("Date deleted" . t)
|
||||
trashed-date-format "%Y-%m-%d %H:%M:%S"))
|
||||
|
||||
(provide 'init-dired)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user