summaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2024-07-13 13:38:14 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2024-07-13 13:38:14 +0100
commit4ef357ebc849bdda3b8483e3ec3930a072eea4aa (patch)
treeee89b115f07aad06d299008f2ab7ef410089daf1 /emacs
parentc48906180ce83808245944096ac737d595512b77 (diff)
emacs: Consolidate Ibuffer configuration
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el40
1 files changed, 21 insertions, 19 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 8200d04..ec347d6 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -52,25 +52,27 @@
;; Buffer Management
-(setopt ibuffer-saved-filter-groups
- `(("default"
- ("Emacs" (or (mode . completion-list-mode)
- (mode . debugger-mode)
- (mode . help-mode)
- (mode . messages-buffer-mode)
- (name . "^\\*scratch\\*$")))
- ("dotfiles" (filename . ,(concat my/dotfiles-directory ".+")))
- ("Magit" (name . "^magit"))
- ("Dired" (mode . dired-mode))
- ("Shells" (mode . term-mode))
- ("Manuals" (or (mode . Info-mode)
- (mode . Man-mode)))))
- ibuffer-show-empty-filter-groups nil)
-
-(my/with-add-hook 'ibuffer-mode-hook
- (ibuffer-switch-to-saved-filter-groups "default"))
-
-(keymap-global-set "C-x C-b" #'ibuffer)
+(use-package ibuffer
+ :config
+ (defun my/ibuffer-hooks ()
+ (ibuffer-switch-to-saved-filter-groups "default"))
+ :hook (ibuffer-mode . my/ibuffer-hooks)
+ :bind ("C-x C-b" . ibuffer)
+ :custom
+ ((ibuffer-saved-filter-groups
+ `(("default"
+ ("Emacs" (or (mode . completion-list-mode)
+ (mode . debugger-mode)
+ (mode . help-mode)
+ (mode . messages-buffer-mode)
+ (name . "^\\*scratch\\*$")))
+ ("dotfiles" (filename . ,(concat my/dotfiles-directory ".+")))
+ ("Magit" (name . "^magit"))
+ ("Dired" (mode . dired-mode))
+ ("Shells" (mode . term-mode))
+ ("Manuals" (or (mode . Info-mode)
+ (mode . Man-mode))))))
+ (ibuffer-show-empty-filter-groups nil)))
;; Project Management