Fix centaur-tabs hide function
This commit is contained in:
+29
-26
@@ -948,33 +948,36 @@ Functions that only use built-in Emacs functionality.
|
|||||||
Functions that use package functionality.
|
Functions that use package functionality.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(defun centaur-tabs-buffer-groups ()
|
(with-eval-after-load 'centaur-tabs
|
||||||
"Organize tabs into groups by buffer."
|
(defun centaur-tabs-buffer-groups ()
|
||||||
(list
|
"Organize tabs into groups by buffer."
|
||||||
(cond
|
(list
|
||||||
((string-equal "*" (substring (buffer-name) 0 1)) "Emacs")
|
(cond
|
||||||
((memq major-mode '(org-mode
|
((string-equal "*" (substring (buffer-name) 0 1)) "Emacs")
|
||||||
emacs-lisp-mode)) "Org Mode")
|
((memq major-mode '(org-mode
|
||||||
((derived-mode-p 'dired-mode) "Dired")
|
emacs-lisp-mode)) "Org Mode")
|
||||||
((derived-mode-p 'prog-mode
|
((derived-mode-p 'dired-mode) "Dired")
|
||||||
'text-mode) "Editing")
|
((derived-mode-p 'prog-mode
|
||||||
(t "User"))))
|
'text-mode) "Editing")
|
||||||
|
(t "User"))))
|
||||||
|
|
||||||
(defun centaur-tabs-hide-tab (buffer)
|
(defun centaur-tabs-hide-tab (buffer)
|
||||||
"Hide from the tab bar by BUFFER name."
|
"Hide from the tab bar by BUFFER name."
|
||||||
(let ((name (format "%s" buffer)))
|
(let ((name (format "%s" buffer)))
|
||||||
(string-match-p
|
(string-match-p
|
||||||
(concat "^\\*\\("
|
(concat "^\\*\\("
|
||||||
"e?shell\\|"
|
"e?shell\\|"
|
||||||
"Completions\\|"
|
"Completions\\|"
|
||||||
"clangd\\|" ; lsp c/c++
|
"clangd\\|" ; lsp c/c++
|
||||||
"Faces\\|"
|
"Faces\\|"
|
||||||
"Help\\|"
|
"Flycheck\\|"
|
||||||
"helpful\\|"
|
"Help\\|"
|
||||||
"iph\\|" ; lsp php
|
"helpful\\|"
|
||||||
"Occur"
|
"iph\\|" ; lsp php
|
||||||
"\\).*")
|
"Occur"
|
||||||
name)))
|
"\\).*")
|
||||||
|
name)))
|
||||||
|
)
|
||||||
|
|
||||||
(defun dashboard-goto-bookmarks ()
|
(defun dashboard-goto-bookmarks ()
|
||||||
"Go to bookmarks."
|
"Go to bookmarks."
|
||||||
|
|||||||
Reference in New Issue
Block a user