Update
This commit is contained in:
@@ -15,7 +15,6 @@
|
||||
(global-set-key (kbd "C-c q r") #'restart-emacs)
|
||||
|
||||
(global-set-key (kbd "C-c C-c") #'compile)
|
||||
|
||||
(global-set-key (kbd "C-x b") 'ibuffer)
|
||||
(global-set-key (kbd "C-x C-b") #'ibuffer)
|
||||
|
||||
(provide 'init-bindings)
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
("M-g k" . consult-keep-lines)
|
||||
("M-g u" . consult-focus-lines)
|
||||
("C-x C-r" . consult-recent-file)
|
||||
("C-x C-b" . consult-buffer)
|
||||
("C-x b" . consult-buffer)
|
||||
|
||||
("M-g e" . consult-isearch-history)
|
||||
:map isearch-mode-map
|
||||
|
||||
@@ -3,18 +3,30 @@
|
||||
|
||||
(use-package project)
|
||||
|
||||
(use-package tab-bar
|
||||
:ensure nil
|
||||
:init
|
||||
(tab-bar-mode t)
|
||||
(setq tab-bar-new-tab-choice "*scratch*") ;; buffer to show in new tabs
|
||||
(setq tab-bar-close-button-show nil) ;; hide tab close / X button
|
||||
(setq tab-bar-show 1) ;; hide bar if <= 1 tabs open
|
||||
(setq tab-bar-format '(tab-bar-format-tabs tab-bar-separator))
|
||||
|
||||
(setq tab-bar-tab-hints t))
|
||||
|
||||
(use-package tabspaces
|
||||
:functions tabspaces-mode
|
||||
:commands (tabspaces-switch-or-create-workspace
|
||||
tabspaces-open-or-create-project-and-workspace)
|
||||
:hook (elpaca-after-init . tabspaces-mode)
|
||||
:bind (:map tabspaces-mode-map
|
||||
([remap project-switch-project] . tabspaces-open-or-create-project-and-workspace)
|
||||
("C-c o l" . tabspaces-restore-session))
|
||||
|
||||
:custom
|
||||
(tab-bar-show nil)
|
||||
([remap project-switch-project] . tabspaces-project-switch-project-open-file))
|
||||
:bind (:map tabspaces-command-map
|
||||
("l" . tabspaces-restore-session)
|
||||
("s" . tabspaces-save-session)
|
||||
("TAB" . tabspaces-switch-or-create-workspace))
|
||||
|
||||
:custom
|
||||
(tabspaces-use-filtered-buffers-as-default t)
|
||||
(tabspaces-default-tab "Default")
|
||||
(tabspaces-remove-to-default t)
|
||||
@@ -23,7 +35,26 @@
|
||||
;; sessions
|
||||
(tabspaces-session t)
|
||||
;; (tabspaces-session-auto-restore t)
|
||||
(tabspaces-keymap-prefix "C-c o")
|
||||
(tab-bar-new-tab-choice "default"))
|
||||
(tabspaces-keymap-prefix "C-c TAB")
|
||||
(tab-bar-new-tab-choice "default")
|
||||
|
||||
(with-eval-after-load 'consult
|
||||
;; hide full buffer list (still available with "b" prefix)
|
||||
(consult-customize consult--source-buffer :hidden nil :default nil)
|
||||
;; set consult-workspace buffer list
|
||||
(defvar consult--source-workspace
|
||||
(list :name "Workspace Buffers"
|
||||
:narrow ?w
|
||||
:history 'buffer-name-history
|
||||
:category 'buffer
|
||||
:state #'consult--buffer-state
|
||||
:default t
|
||||
:items (lambda () (consult--buffer-query
|
||||
:predicate #'tabspaces--local-buffer-p
|
||||
:sort 'visibility
|
||||
:as #'buffer-name)))
|
||||
|
||||
"Set workspace buffer list for consult-buffer.")
|
||||
(add-to-list 'consult-buffer-sources 'consult--source-workspace)))
|
||||
|
||||
(provide 'init-workspace)
|
||||
|
||||
Reference in New Issue
Block a user