ema2159 / centaur-tabs

Emacs plugin aiming to become an aesthetic, modern looking tabs plugin
GNU General Public License v3.0
740 stars 50 forks source link

hide tabs still can be selected #237

Open goodboylqs opened 2 months ago

goodboylqs commented 2 months ago

Mr.ema2159,thanks for your hardworking to create centaur-tabs.Recently I found that the hide tabs use centaur-tabs-forward/backward still can be selected which doesn't happen before,just like buffer eaf in my configuration is hided but it still can be selected use centaur-tabs-forward,it works very well before and my configuration hasn't change all the time.below is my configuration,please let me know if I make something wrong.

(use-package centaur-tabs
  :ensure t
  :demand
  :config
  (centaur-tabs-mode t)
  (centaur-tabs-headline-match)
  (centaur-tabs-group-by-projectile-project)
  (centaur-tabs-change-fonts "arial" 160)
  (setq centaur-tabs-style "wave"
        centaur-tabs-height 45
        centaur-tabs-set-modified-marker t
        centaur-tabs-show-navigation-buttons t)
  ;;(setq centaur-tabs-set-icons t)
  (setq centaur-tabs-plain-icons t)
  (setq centaur-tabs-gray-out-icons 'buffer)
  (setq centaur-tabs-set-bar 'under) 
  (setq centaur-tabs-set-close-button nil)
  (setq uniquify-separator "/")
  (setq uniquify-buffer-name-style 'forward)
  ;; :bind
  ;; ("C-b" . centaur-tabs-backward)
  ;; ("C-f" . centaur-tabs-forward)
  ;; ("C-c b" . centaur-tabs-backward-group)
  ;; ("C-c f" . centaur-tabs-forward-group)
  ;; ("C-c w" . kill-this-buffer)
  (defun centaur-tabs-hide-tab (x)
    "Do no to show buffer X in tabs."
    (let ((name (format "%s" x)))
      (or
       ;; Current window is not dedicated window.
       (window-dedicated-p (selected-window))
       ;; Buffer name not match below blacklist.
       (string-prefix-p "*epc" name)
       (string-prefix-p "*Calendar" name)     
       (string-prefix-p "*help" name)
       (string-prefix-p "*Help" name)
       (string-prefix-p "*mybuf" name)
       (string-prefix-p "*Compile-Log*" name)
       (string-prefix-p "*nov unzip*" name)
       (string-prefix-p "*Warning*" name)
       (string-prefix-p "*epc" name)
       (string-prefix-p "*helm" name)
       (string-prefix-p "*Helm" name)
       (string-prefix-p "*lsp" name)
       (string-prefix-p "*company" name)
       (string-prefix-p "*Flycheck" name)
       (string-prefix-p "*tramp" name)
       (string-prefix-p "*Mini" name)
       (string-prefix-p "*straight" name)
       (string-prefix-p "*temp" name)
       (string-prefix-p "*eaf" name)
       (string-prefix-p "*epc" name)
       (string-prefix-p "*popweb" name)
       (string-prefix-p "*httpd*" name)
       (string-prefix-p "emacs.org" name)
       (string-prefix-p "life.org" name)
       (string-prefix-p "work.org" name)
       (string-prefix-p "*popweb" name)
       (string-prefix-p "*clangd*" name)
       (string-prefix-p "*html-ls*" name)
       (string-prefix-p "*ts-ls*" name)
       (string-prefix-p "*blink-search" name)
       (string-prefix-p "*holo-layer" name)
       ;; Is not magit buffer.
       (and (string-prefix-p "magit" name)
            (not (file-name-extension name)))
       )
      )
    )
  )
jcs090218 commented 2 months ago

Hmm... I may have break something. I'll look into it!

goodboylqs commented 1 month ago

Mr.jcs090218,I have updated package to version 20240726,but the problem still exists....

jcs090218 commented 1 month ago

Sorry, I was a little busy recently. I will try to look into it when I have time. 😓

goodboylqs commented 1 month ago

thanks for your work Mrjcs090218,I mistakenly thought you had fixed the issue in your July 26 push.I didn't mean to rush you. I hope you can review this issue again when you are not busy