(use-package tabspaces :ensure t :hook (after-init . tabspaces-mode) ;; use this only if you want the minor-mode loaded at startup. :commands (tabspaces-switch-or-create-workspace tabspaces-open-or-create-project-and-workspace) :general (:keymaps 'override :states '(normal visual) :prefix "SPC" "p" '(:ignore t :wk "project") "p p" '(tabspaces-open-or-create-project-and-workspace :wk "find project") "p q" '(tabspaces-kill-buffers-close-workspace :wk"kill project buffer") "p s" '(tabspaces-save-current-project-session :wk"save project sessions") "p r" '(tabspaces-restore-session :wk"restore project sessions") ) :custom (tabspaces-use-filtered-buffers-as-default t) (tabspaces-default-tab "Default") (tabspaces-remove-to-default t) (tabspaces-include-buffers '("*scratch*")) (tabspaces-initialize-project-with-todo nil) ;; (tabspaces-todo-file-name "project-todo.org") ;; sessions ;; (tabspaces-session t) ;; (tabspaces-session-auto-restore t) (tab-bar-new-tab-choice "*scratch*")) :config (with-eval-after-load 'consult ;; hide full buffer list (still available with "b" prefix) (consult-customize consult--source-buffer :hidden t :default nil)
(defun consult--filter-sort-tab-buffers (buf) "Filter out the *sort-tab* buffer and check if buffer is local to tabspace." (and (not (string= (buffer-name buf) "*sort-tab*")) (tabspaces--local-buffer-p buf)))