Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support project.el #209

Open
swarnendubiswas opened this issue Jun 18, 2023 · 4 comments
Open

Support project.el #209

swarnendubiswas opened this issue Jun 18, 2023 · 4 comments

Comments

@swarnendubiswas
Copy link

Does centaur-tabs support project.el instead of projectile? The project buffers are not aligned in the same tabs view when using project.el. I can reproduce the problem with Emacs 28.2 with the following MWE and emacs -nw -q.

(setq straight-build-dir (format "build/%d%s%d"
                                 emacs-major-version
                                 version-separator
                                 emacs-minor-version)
      straight-use-package-by-default t)

(let ((bootstrap-file
       (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
      (bootstrap-version 6))
  (unless (file-exists-p bootstrap-file)
    (with-current-buffer
        (url-retrieve-synchronously
         "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
         'silent 'inhibit-cookies)
      (goto-char (point-max))
      (eval-print-last-sexp)))
  (load bootstrap-file nil 'nomessage))

(setq use-package-hook-name-suffix nil)
(straight-use-package 'use-package)

(use-package project
  :bind-keymap ("C-c p" . project-prefix-map)
  :bind
  (("<f5>" . project-switch-project)
    ("<f6>" . project-find-file)))

(use-package centaur-tabs
  :hook (emacs-startup-hook . centaur-tabs-mode)
  :bind*
  (("M-<right>" . centaur-tabs-forward-tab)
    ("M-<left>" . centaur-tabs-backward-tab)
    ("M-\"" . centaur-tabs-ace-jump))
  :custom
  (centaur-tabs-set-modified-marker t)
  (centaur-tabs-modified-marker "•") ; Unicode Bullet (0x2022)
  (centaur-tabs-set-close-button nil "I do not use the mouse")
  (centaur-tabs-show-new-tab-button nil "I do not use the mouse")
  (centaur-tabs-enable-ido-completion nil)
  ;; Other styles like "wave" are not rendered on the terminal, and also does not work well with
  ;; many themes
  (centaur-tabs-style "bar")
  (centaur-tabs-set-bar 'under)
  (centaur-tabs-height 18)
  (centaur-tabs-set-icons nil)
  (centaur-tabs-icon-type 'nerd-icons)
  (centaur-tabs-gray-out-icons t "Gray out icons for inactive tabs"))
@grolongo
Copy link

It does, as I have it working without any specific project.el configuration. I'm using Emacs 29 though.
I suggest you either compile Emacs yourself or use a pretest release of Emacs 29 to make sure.
You could also just wait for the next stable Emacs release which should happen in a few days now.

@swarnendubiswas
Copy link
Author

No, project.el is not playing nicely with centaur-tabs even on Emacs 29 RC2 for me.

@grolongo
Copy link

you need to define centaur-tabs-buffer-groups with (t (centaur-tabs-get-group-name (current-buffer) under :config in your use-package declaration, example:

(defun centaur-tabs-buffer-groups ()
  "Centaur grouping."
  (list (cond ((derived-mode-p 'erc-mode) "ERC")
              (t (centaur-tabs-get-group-name (current-buffer))))))

@swarnendubiswas
Copy link
Author

@grolongo Your suggested snippet does not work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants