fix(tabs): workspace-scoped buffer lists

This commit is contained in:
Henrik Lissner 2024-09-03 06:42:58 -04:00
parent 2d3f003969
commit 52c91cc51c
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -23,6 +23,18 @@
(add-hook 'doom-first-file-hook #'centaur-tabs-mode))
:config
(defun +tabs-buffer-list ()
(seq-filter (lambda (b)
(cond ((eq (current-buffer) b) b)
((doom-temp-buffer-p b) nil)
((doom-unreal-buffer-p b) nil)
((buffer-file-name b) b)
((buffer-live-p b) b)))
(if (bound-and-true-p persp-mode)
(persp-buffer-list)
(buffer-list))))
(setq centaur-tabs-buffer-list-function #'+tabs-buffer-list)
(add-hook! '(+doom-dashboard-mode-hook +popup-buffer-mode-hook)
(defun +tabs-disable-centaur-tabs-mode-maybe-h ()
"Disable `centaur-tabs-mode' in current buffer."