Configure tabspaces for tab-specific buffer grouping
This commit is contained in:
parent
a64efec920
commit
415f33880c
1 changed files with 33 additions and 11 deletions
|
|
@ -311,6 +311,39 @@ buffer switching — splits should be intentional.
|
|||
(tab-bar-echo-area-mode 1)
|
||||
(setq tab-bar-show nil))
|
||||
#+end_src
|
||||
** Tabspaces
|
||||
Buffers, and much of buffer-selection UI (=consult-buffer=, ibuffer, etc.),
|
||||
are scoped per tab via =tabspaces=. Each tab gets its own isolated buffer
|
||||
list, similar to workspaces in other editors — switching tabs only shows you
|
||||
the buffers relevant to that tab.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package tabspaces
|
||||
:ensure t
|
||||
:hook (after-init . tabspaces-mode)
|
||||
:commands (tabspaces-switch-or-create-workspace
|
||||
tabspaces-open-or-create-project-and-workspace)
|
||||
:config
|
||||
(setq tabspaces-use-filtered-buffers-as-default t)
|
||||
(setq tabspaces-default-tab "Default")
|
||||
(setq tabspaces-remove-to-default t)
|
||||
(setq tabspaces-include-buffers '("*scratch*"))
|
||||
;; Keep consult-buffer scoped to the current tab's buffer list.
|
||||
;; tabspaces doesn't ship a consult source itself, so define one here
|
||||
;; using its own buffer-list function, and put it ahead of consult's
|
||||
;; default (unfiltered) buffer source.
|
||||
(with-eval-after-load 'consult
|
||||
(defvar consult--source-tabspaces
|
||||
`(:name "Workspace Buffers"
|
||||
:narrow ?w
|
||||
:category buffer
|
||||
:face consult-buffer
|
||||
:history buffer-name-history
|
||||
:state ,#'consult--buffer-state
|
||||
:items ,(lambda () (mapcar #'buffer-name (tabspaces--buffer-list)))))
|
||||
(consult-customize consult--source-buffer :hidden t :default nil)
|
||||
(add-to-list 'consult-buffer-sources 'consult--source-tabspaces)))
|
||||
#+end_src
|
||||
* Evil
|
||||
#+begin_src emacs-lisp
|
||||
(use-package evil
|
||||
|
|
@ -892,17 +925,6 @@ I know these could be bound on a per-package basis, but since this is my primary
|
|||
"v" '(:ignore t :which-key "visual/appearance")
|
||||
"vt" '(load-theme :which-key "load theme")
|
||||
|
||||
;; TODO: maybe make this mode-specific stuff, not using workspaces
|
||||
;; Workspaces
|
||||
;; "TAB TAB" '(+workspace/display :which-key "Display tab bar")
|
||||
;; "TAB d" '(+workspace/delete :which-key "Delete this workspace")
|
||||
;; "TAB l" '(+workspace/load :which-key "Load workspace from file")
|
||||
;; "TAB n" '(+workspace/new :which-key "New workspace")
|
||||
;; "TAB N" '(+workspace/new-named :which-key "New named workspace")
|
||||
;; "TAB r" '(+workspace/rename :which-key "Rename workspace")
|
||||
;; "TAB R" '(+workspace/restore-last-session :which-key "Restore last session")
|
||||
;; "TAB s" '(+workspace/save :which-key "Save workspace")
|
||||
;; "TAB x" '(+workspace/kill-session :which-key "Delete session")
|
||||
))
|
||||
#+end_src
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue