summaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/init.el
diff options
context:
space:
mode:
authorBobby Bingham <koorogi@koorogi.info>2020-07-25 17:28:32 -0500
committerBobby Bingham <koorogi@koorogi.info>2021-02-06 10:40:54 -0600
commitc35919801ff07024b9feffe884e722a473c3ab28 (patch)
treebab2ed8c8d0e6b74a15a59a5afa6e4ed05c46681 /emacs/.emacs.d/init.el
parent8ce11caca69e68f3b9dd7613ba516bc7f042d79c (diff)
emacs: add buffer list sidebar
Diffstat (limited to 'emacs/.emacs.d/init.el')
-rw-r--r--emacs/.emacs.d/init.el16
1 files changed, 14 insertions, 2 deletions
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-<prior>" . centaur-tabs-backward)
("C-<next>" . 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
- ("<f8>" . dired-sidebar-toggle-sidebar)
+ ("<f8>" . bab/sidebar-toggle)
:commands
(dired-sidebar-toggle-sidebar)
:hook