From cccff7190a80a6e5a9e8f357de09e32320b1fb78 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Fri, 22 Oct 2021 11:28:53 +0100 Subject: [PATCH] feat(projects/treemacs): customize highlight line background color --- modules/projects/siren-treemacs.el | 18 ++++++++++++++++++ themes/siren-doom-themes-overrides-theme.el | 4 ++++ 2 files changed, 22 insertions(+) diff --git a/modules/projects/siren-treemacs.el b/modules/projects/siren-treemacs.el index 5f8ff3a..2160a50 100644 --- a/modules/projects/siren-treemacs.el +++ b/modules/projects/siren-treemacs.el @@ -11,6 +11,9 @@ ("C-x C-p" . treemacs) ("C-x p" . treemacs-select-window) + :hook + (treemacs-mode . siren-treemacs-change-hl-line-mode) + :custom (treemacs-collapse-dirs 3) (treemacs-follow-after-init t) @@ -26,6 +29,21 @@ (treemacs-last-error-persist-file (expand-file-name "treemacs-persist-at-last-error" siren-cache-dir)) + :init + (defgroup siren-treemacs nil + "Siren specific settings for treemacs." + :group 'treemacs) + + (defface siren-treemacs-line-highlight '((t (:extend t))) + "Custom line-highlight face for treemacs." + :group 'siren-treemacs) + + (defun siren-treemacs-change-hl-line-mode () + "Use a custom face to control style of highlighted line." + (setq-local hl-line-face 'siren-treemacs-line-highlight) + (overlay-put hl-line-overlay 'face hl-line-face) + (treemacs--setup-icon-background-colors)) + :config (defvar treemacs-no-load-time-warnings t) diff --git a/themes/siren-doom-themes-overrides-theme.el b/themes/siren-doom-themes-overrides-theme.el index 47de394..917cd96 100644 --- a/themes/siren-doom-themes-overrides-theme.el +++ b/themes/siren-doom-themes-overrides-theme.el @@ -102,6 +102,10 @@ `(diredp-deletion-file-name ((t ( :foreground ,(doom-color 'red) )))) `(diredp-compressed-file-name ((t ( :foreground ,(doom-color 'blue) )))) + ;; treemacs + `(siren-treemacs-line-highlight ((t ( :background ,(doom-blend 'violet 'bg 0.2) + :extend t )))) + ;; selectrum `(selectrum-current-candidate ((t ( :background ,(doom-blend 'violet 'bg 0.2) :foreground ,(doom-blend 'violet 'fg 0.3)