fix(tabs): workspace-scoped buffer lists
This commit is contained in:
parent
2d3f003969
commit
52c91cc51c
1 changed files with 12 additions and 0 deletions
|
@ -23,6 +23,18 @@
|
||||||
(add-hook 'doom-first-file-hook #'centaur-tabs-mode))
|
(add-hook 'doom-first-file-hook #'centaur-tabs-mode))
|
||||||
|
|
||||||
:config
|
: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)
|
(add-hook! '(+doom-dashboard-mode-hook +popup-buffer-mode-hook)
|
||||||
(defun +tabs-disable-centaur-tabs-mode-maybe-h ()
|
(defun +tabs-disable-centaur-tabs-mode-maybe-h ()
|
||||||
"Disable `centaur-tabs-mode' in current buffer."
|
"Disable `centaur-tabs-mode' in current buffer."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue