diff --git a/config.org b/config.org index bc1dd37..334ead1 100644 --- a/config.org +++ b/config.org @@ -100,6 +100,56 @@ (doom-modeline-mode)) #+end_src +** Projectile + +#+begin_src emacs-lisp + (use-package projectile + :ensure t + :config + (projectile-mode +1) + (setq projectile-completion-system 'ivy)) +#+end_src + +** Centaur Tabs + +#+begin_src emacs-lisp + (use-package centaur-tabs + :ensure t + :config + (setq centaur-tabs-cycle-scope 'tabs + centaur-tabs-height 32 + centaur-tabs-icon-type 'nerd-icons + centaur-tabs-left-edge-margin nil + centaur-tabs-set-bar 'under + centaur-tabs-set-close-button nil + centaur-tabs-set-icons t + centaur-tabs-set-modified-marker t + centaur-tabs-show-count nil + centaur-tabs-show-new-tab-button t + centaur-tabs-style "bar" + x-underline-at-descent-line t) + (centaur-tabs-group-by-projectile-project) + (centaur-tabs-mode t) + (defun centaur-tabs-hide-tab (x) + (let ((name (format "%s" x))) + (or + (window-dedicated-p (selected-window)) + (string-prefix-p "*" name) + (string-prefix-p "magit" name) + (derived-mode-p 'dired-mode)))) + :hook + (dashboard-mode . centaur-tabs-local-mode) + (treemacs-mode . centaur-tabs-local-mode) + (spacemacs-buffer-mode . centaur-tabs-local-mode) + (term-mode . centaur-tabs-local-mode) + (calendar-mode . centaur-tabs-local-mode) + (org-agenda-mode . centaur-tabs-local-mode) + (helpful-mode . centaur-tabs-local-mode) + (dired-mode . centaur-tabs-local-mode) + (zone-mode . centaur-tabs-local-mode) + (helm-mode . centaur-tabs-local-mode)) +#+end_src + ** VTerm #+begin_src emacs-lisp @@ -141,7 +191,7 @@ indent-tabs-mode nil evil-auto-indent t)) - (dolist (hook '(c++-mode-hook c-mode-hook c++-ts-mode-hook c-ts-mode-hook)) (add-hook hook 'indent-tabs-hook)) + (dolist (hook '(c++-mode-hook c-mode-hook c++-ts-mode-hook c-ts-mode-hook org-mode-hook)) (add-hook hook 'indent-tabs-hook)) (use-package evil :ensure t @@ -190,8 +240,10 @@ (general-define-key :states '(normal visual emacs) :keymaps 'override - "K" '(eldoc-box-help-at-point :wk "Hover") - "C-t" '(my/vterm-toggle-project-root :wk "Toggle VTerm"))) + "H" '(centaur-tabs-backward :wk "Previous tab") + "L" '(centaur-tabs-forward :wk "Next tab") + "K" '(eldoc-box-help-at-point :wk "Hover") + "C-t" '(my/vterm-toggle-project-root :wk "Toggle VTerm"))) (use-package evil-collection :ensure t @@ -203,6 +255,8 @@ :config (global-evil-leader-mode) (setq evil-leader/leader "") + (evil-leader/set-key "bt" #'centaur-tabs-ace-jump) + (evil-leader/set-key "bg" #'centaur-tabs-counsel-switch-group) (evil-leader/set-key "bb" #'switch-to-buffer) (evil-leader/set-key "bj" #'breadcrumb-jump) (evil-leader/set-key "e" #'dirvish-side)