Remove tab customization
This commit is contained in:
parent
9e35eac91a
commit
88d382c1ae
2 changed files with 76 additions and 76 deletions
|
@ -252,89 +252,89 @@
|
||||||
(setq! uniquify-separator "/")
|
(setq! uniquify-separator "/")
|
||||||
(setq! uniquify-buffer-name-style 'forward)
|
(setq! uniquify-buffer-name-style 'forward)
|
||||||
|
|
||||||
(use-package centaur-tabs
|
;; (use-package centaur-tabs
|
||||||
:init
|
;; :init
|
||||||
(setq centaur-tabs-enable-key-bindings t)
|
;; (setq centaur-tabs-enable-key-bindings t)
|
||||||
:config
|
;; :config
|
||||||
(setq centaur-tabs-style "wave"
|
;; (setq centaur-tabs-style "wave"
|
||||||
centaur-tabs-height 32
|
;; centaur-tabs-height 32
|
||||||
centaur-tabs-set-icons t
|
;; centaur-tabs-set-icons t
|
||||||
centaur-tabs-show-new-tab-button t
|
;; centaur-tabs-show-new-tab-button t
|
||||||
centaur-tabs-show-navigation-buttons t
|
;; centaur-tabs-show-navigation-buttons t
|
||||||
centaur-tabs-set-bar 'under
|
;; centaur-tabs-set-bar 'under
|
||||||
centaur-tabs-show-count t
|
;; centaur-tabs-show-count t
|
||||||
centaur-tabs-gray-out-icons 'buffer
|
;; centaur-tabs-gray-out-icons 'buffer
|
||||||
x-underline-at-descent-line t
|
;; x-underline-at-descent-line t
|
||||||
centaur-tabs-set-modified-marker t
|
;; centaur-tabs-set-modified-marker t
|
||||||
centaur-tabs-modified-marker "•"
|
;; centaur-tabs-modified-marker "•"
|
||||||
centaur-tabs-close-button "x"
|
;; centaur-tabs-close-button "x"
|
||||||
centaur-tabs-cycle-scope 'tabs
|
;; centaur-tabs-cycle-scope 'tabs
|
||||||
centaur-tabs-adjust-buffer-order t
|
;; centaur-tabs-adjust-buffer-order t
|
||||||
centaur-tabs-left-edge-margin nil)
|
;; centaur-tabs-left-edge-margin nil)
|
||||||
|
|
||||||
(centaur-tabs-change-fonts (face-attribute 'default :font) 110)
|
;; (centaur-tabs-change-fonts (face-attribute 'default :font) 110)
|
||||||
(centaur-tabs-headline-match)
|
;; (centaur-tabs-headline-match)
|
||||||
(centaur-tabs-group-by-projectile-project)
|
;; (centaur-tabs-group-by-projectile-project)
|
||||||
;; (centaur-tabs-enable-buffer-alphabetical-reordering)
|
;; ;; (centaur-tabs-enable-buffer-alphabetical-reordering)
|
||||||
(centaur-tabs-mode t)
|
;; (centaur-tabs-mode t)
|
||||||
|
|
||||||
|
|
||||||
(defvar categories-alist
|
;; (defvar categories-alist
|
||||||
'(
|
;; '(
|
||||||
(:name "org" :modes (org-mode org-agenda-mode) :buffer-name () :type global)
|
;; (:name "org" :modes (org-mode org-agenda-mode) :buffer-name () :type global)
|
||||||
(:name "gptel" :modes nil :buffer-name ("*llama-cpp*" "*llama-cpp-code*" "*llama-cpp-bigchat*" "*llama-cpp-biggerchat*" "*gptel*" "*groq*" "*gptel-context*" "*gptel-query*") :type global)
|
;; (:name "gptel" :modes nil :buffer-name ("*llama-cpp*" "*llama-cpp-code*" "*llama-cpp-bigchat*" "*llama-cpp-biggerchat*" "*gptel*" "*groq*" "*gptel-context*" "*gptel-query*") :type global)
|
||||||
(:name "terminal" :modes (vterm-mode term-mode) :buffer-name () :type per-project)
|
;; (:name "terminal" :modes (vterm-mode term-mode) :buffer-name () :type per-project)
|
||||||
(:name "misc" :modes (+doom-dashboard-mode native-comp-limple-mode messages-buffer-mode) :buffer-name () :type global)
|
;; (:name "misc" :modes (+doom-dashboard-mode native-comp-limple-mode messages-buffer-mode) :buffer-name () :type global)
|
||||||
(:name "misc" :modes (special-mode fundamental-mode) :buffer-name () :type per-project)
|
;; (:name "misc" :modes (special-mode fundamental-mode) :buffer-name () :type per-project)
|
||||||
)
|
;; )
|
||||||
"Mapping of categories to modes with their respective type logic.")
|
;; "Mapping of categories to modes with their respective type logic.")
|
||||||
|
|
||||||
(defun get-project-name-or-default (default-name)
|
;; (defun get-project-name-or-default (default-name)
|
||||||
"Return the project name if available, or DEFAULT-NAME."
|
;; "Return the project name if available, or DEFAULT-NAME."
|
||||||
(if-let ((project-root (condition-case _err
|
;; (if-let ((project-root (condition-case _err
|
||||||
(projectile-project-root)
|
;; (projectile-project-root)
|
||||||
(error nil))))
|
;; (error nil))))
|
||||||
(concat (projectile-project-name) "::" default-name)
|
;; (concat (projectile-project-name) "::" default-name)
|
||||||
default-name))
|
;; default-name))
|
||||||
|
|
||||||
(defun get-category-name (buffer)
|
;; (defun get-category-name (buffer)
|
||||||
"Get category name for the given BUFFER."
|
;; "Get category name for the given BUFFER."
|
||||||
(let (category-name)
|
;; (let (category-name)
|
||||||
(dolist (category categories-alist category-name)
|
;; (dolist (category categories-alist category-name)
|
||||||
(let ((buffer-names (plist-get category :buffer-name))
|
;; (let ((buffer-names (plist-get category :buffer-name))
|
||||||
(modes (plist-get category :modes)))
|
;; (modes (plist-get category :modes)))
|
||||||
(cond
|
;; (cond
|
||||||
((and buffer-names (member (buffer-name buffer) buffer-names))
|
;; ((and buffer-names (member (buffer-name buffer) buffer-names))
|
||||||
(setq category-name
|
;; (setq category-name
|
||||||
(if (eq (plist-get category :type) 'per-project)
|
;; (if (eq (plist-get category :type) 'per-project)
|
||||||
(get-project-name-or-default (plist-get category :name))
|
;; (get-project-name-or-default (plist-get category :name))
|
||||||
(plist-get category :name))))
|
;; (plist-get category :name))))
|
||||||
((and modes (with-current-buffer buffer (memq major-mode modes)))
|
;; ((and modes (with-current-buffer buffer (memq major-mode modes)))
|
||||||
(setq category-name
|
;; (setq category-name
|
||||||
(if (eq (plist-get category :type) 'per-project)
|
;; (if (eq (plist-get category :type) 'per-project)
|
||||||
(get-project-name-or-default (plist-get category :name))
|
;; (get-project-name-or-default (plist-get category :name))
|
||||||
(plist-get category :name)))))))))
|
;; (plist-get category :name)))))))))
|
||||||
|
|
||||||
(defun centaur-tabs-group-name-by-category ()
|
;; (defun centaur-tabs-group-name-by-category ()
|
||||||
"Get tab group name based on category."
|
;; "Get tab group name based on category."
|
||||||
(let ((mode-category (get-category-name (current-buffer))))
|
;; (let ((mode-category (get-category-name (current-buffer))))
|
||||||
(if mode-category
|
;; (if mode-category
|
||||||
(list mode-category)
|
;; (list mode-category)
|
||||||
(list (get-project-name-or-default "main")))))
|
;; (list (get-project-name-or-default "main")))))
|
||||||
|
|
||||||
(defun centaur-tabs-projectile-buffer-groups ()
|
;; (defun centaur-tabs-projectile-buffer-groups ()
|
||||||
"Return the list of group names BUFFER belongs to."
|
;; "Return the list of group names BUFFER belongs to."
|
||||||
(if centaur-tabs-projectile-buffer-group-calc
|
;; (if centaur-tabs-projectile-buffer-group-calc
|
||||||
(symbol-value 'centaur-tabs-projectile-buffer-group-calc)
|
;; (symbol-value 'centaur-tabs-projectile-buffer-group-calc)
|
||||||
(set (make-local-variable 'centaur-tabs-projectile-buffer-group-calc)
|
;; (set (make-local-variable 'centaur-tabs-projectile-buffer-group-calc)
|
||||||
(centaur-tabs-group-name-by-category))))
|
;; (centaur-tabs-group-name-by-category))))
|
||||||
|
|
||||||
(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."
|
||||||
(when (centaur-tabs-mode-on-p)
|
;; (when (centaur-tabs-mode-on-p)
|
||||||
(centaur-tabs-local-mode))))
|
;; (centaur-tabs-local-mode))))
|
||||||
)
|
;; )
|
||||||
|
|
||||||
;; ruby
|
;; ruby
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
;;neotree ; a project drawer, like NERDTree for vim
|
;;neotree ; a project drawer, like NERDTree for vim
|
||||||
ophints ; highlight the region an operation acts on
|
ophints ; highlight the region an operation acts on
|
||||||
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
(popup +defaults) ; tame sudden yet inevitable temporary windows
|
||||||
;; tabs ; a tab bar for Emacs
|
tabs ; a tab bar for Emacs
|
||||||
treemacs ; a project drawer, like neotree but cooler
|
treemacs ; a project drawer, like neotree but cooler
|
||||||
;;unicode ; extended unicode support for various languages
|
;;unicode ; extended unicode support for various languages
|
||||||
(vc-gutter
|
(vc-gutter
|
||||||
|
|
Loading…
Add table
Reference in a new issue