feat(version-control): use diff-hl-margin-mode when running Emacs in a terminal

This commit is contained in:
2021-02-16 22:45:57 +00:00
parent 62029fd834
commit efae487c94
2 changed files with 16 additions and 1 deletions

View File

@@ -90,6 +90,17 @@
:foreground (doom-blend 'vc-modified 'bg 0.7)
:background (doom-blend 'vc-modified 'bg 0.2)))
(with-eval-after-load 'diff-hl-margin
(set-face-attribute 'diff-hl-margin-insert nil
:foreground (doom-blend 'vc-added 'bg 0.6)
:background (doom-blend 'vc-added 'bg 0.1))
(set-face-attribute 'diff-hl-margin-delete nil
:foreground (doom-blend 'vc-deleted 'bg 0.7)
:background (doom-blend 'vc-deleted 'bg 0.1))
(set-face-attribute 'diff-hl-margin-change nil
:foreground (doom-blend 'vc-modified 'bg 0.5)
:background (doom-blend 'vc-modified 'bg 0.1)))
(with-eval-after-load 'hideshowvis
(set-face-attribute 'hideshowvis-hidable-face nil
:foreground (doom-color 'base7)))

View File

@@ -18,7 +18,11 @@
:init
(defun siren-turn-on-diff-hl-mode ()
(turn-on-diff-hl-mode)
(diff-hl-flydiff-mode 1)))
(diff-hl-flydiff-mode 1))
:config
(if (not (window-system))
(diff-hl-margin-mode 1)))
(provide 'siren-diff-hl)
;;; siren-diff-hl.el ends here