From c35919801ff07024b9feffe884e722a473c3ab28 Mon Sep 17 00:00:00 2001 From: Bobby Bingham Date: Sat, 25 Jul 2020 17:28:32 -0500 Subject: emacs: add buffer list sidebar --- emacs/.emacs.d/init.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'emacs/.emacs.d/init.el') diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 4238959..1e8cd33 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -5,6 +5,12 @@ (defun bab/disable-line-numbers (&optional dummy) (display-line-numbers-mode -1)) +(defun bab/sidebar-toggle () + "Toggle both `dired-sidebar' and `ibuffer-sidebar'." + (interactive) + (dired-sidebar-toggle-sidebar) + (ibuffer-sidebar-toggle-sidebar)) + ;; --- BUG WORKAROUNDS --- ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=34341 @@ -106,14 +112,20 @@ ("C-" . centaur-tabs-backward) ("C-" . centaur-tabs-forward)) -;; --- FILE TREE --- +;; --- FILE TREE / BUFFER LIST --- (use-package vscode-icon :ensure t :commands (vscode-icon-for-file)) +(use-package ibuffer-sidebar + :commands + (ibuffer-sidebar-toggle-sidebar) + :hook + (ibuffer-sidebar-mode . bab/disable-line-numbers)) + (use-package dired-sidebar :bind - ("" . dired-sidebar-toggle-sidebar) + ("" . bab/sidebar-toggle) :commands (dired-sidebar-toggle-sidebar) :hook -- cgit v1.2.3