diff --git a/modules/ui/tabs/config.el b/modules/ui/tabs/config.el index b4d2b9124..d46ea273f 100644 --- a/modules/ui/tabs/config.el +++ b/modules/ui/tabs/config.el @@ -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."