emacs : Highlight ibuffer

This commit is contained in:
2024-09-04 11:13:14 +09:00
parent 95d8784764
commit 3306707949
3 changed files with 41 additions and 16 deletions

View File

@ -70,9 +70,9 @@ Otherwise the startup will be very slow. "
(require 'init-bookmark)
(require 'init-dashboard)
(require 'init-dired)
;;(require 'init-highlight)
;;(require 'init-ibuffer)
;;(require 'init-persp)
(require 'init-highlight)
(require 'init-ibuffer)
;;(require 'init-window)
(require 'init-treemacs)
;;

View File

@ -3,7 +3,7 @@
(require 'init-funcs)
(use-package hl-line
:ensure nil
:ensure nil ;; built-in package
:hook ((after-init . global-hl-line-mode)
((dashboard-mode eshell-mode shell-mode term-mode vterm-mode) .
(lambda () (setq-local global-hl-line-mode nil))))
@ -11,6 +11,9 @@
(set-face-background 'hl-line "gray8"))
(use-package symbol-overlay
:straight t
:ensure t
:defer t
:diminish
:custom-face
;;(symbol-overlay-default-face ((t (:inherit region :background unspecified :foreground unspecified))))
@ -49,6 +52,9 @@
;; Colorize color names in buffers
(use-package rainbow-mode
:straight t
:ensure t
:defer t
:diminish
:defines helpful-mode-map
:bind (:map help-mode-map
@ -76,10 +82,16 @@
;; Highlight brackets according to their depth
(use-package rainbow-delimiters
:straight t
:ensure t
:defer t
:hook (prog-mode . rainbow-delimiters-mode))
;; keywords from doom-emacs
(use-package hl-todo
:straight t
:ensure t
:defer t
:custom-face
(hl-todo ((t (:inherit default :height 0.9 :width condensed :weight bold :underline nil :inverse-video t))))
:hook (after-init . global-hl-todo-mode)
@ -112,6 +124,9 @@
(add-to-list 'hl-todo-keyword-faces `(,keyword . "#8d9eaf"))))
(use-package diff-hl
:straight t
:ensure t
:defer t
:hook ((after-init . global-diff-hl-mode)
(magit-post-refresh . diff-hl-magit-post-refresh)
(dired-mode . diff-hl-dired-mode-unless-remote))
@ -145,7 +160,7 @@
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh))))
;; Pulse current line
(use-package pulse
:ensure nil
:ensure nil ;; built-in
:custom-face
(pulse-highlight-start-face ((t (:inherit region :background unspecified))))
(pulse-highlight-face ((t (:inherit region :background unspecified :extend t))))

View File

@ -3,20 +3,30 @@
(require 'init-funcs)
(use-package ibuffer
:ensure nil
:init (setq ibuffer-filter-group-name-face '(:inherit (font-lock-string-face bold)))
:config
;; Display icons for buffers
(use-package nerd-icons-ibuffer
:hook (ibuffer-mode . nerd-icons-ibuffer-mode)
:init (setq nerd-icons-ibuffer-icon t)))
:ensure nil ; built-in
:init
(setq ibuffer-filter-group-name-face
'(:inherit (font-lock-string-face bold))))
(use-package nerd-icons-ibuffer
:straight t
:ensure t
:defer t
:hook
(ibuffer-mode . nerd-icons-ibuffer-mode)
:init
(setq nerd-icons-ibuffer-icon t))
;; Group ibuffer's list by project
(use-package ibuffer-project
:hook (ibuffer . (lambda ()
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
(unless (eq ibuffer-sorting-mode 'project-file-relative)
(ibuffer-do-sort-by-project-file-relative))))
:init (setq ibuffer-project-use-cache t)
:straight t
:ensure t
:defer t
:hook
(ibuffer . (lambda ()
(setq ibuffer-filter-groups (ibuffer-project-generate-filter-groups))
(unless (eq ibuffer-sorting-mode 'project-file-relative)
(ibuffer-do-sort-by-project-file-relative))))
:init
(setq ibuffer-project-use-cache t)
:config
(add-to-list 'ibuffer-project-root-functions '(file-remote-p . "Remote"))
(add-to-list 'ibuffer-project-root-functions '("\\*.+\\*" . "Default")))