From cd243d155adacf79bffab00c1dfa75371206507d Mon Sep 17 00:00:00 2001 From: Alexis Mousset Date: Wed, 20 Sep 2023 18:19:55 +0200 Subject: [PATCH] Allow specifying a different style for diff indicator in vcs gutter. This allows using a background in diff style (for nice patch file coloring) while keeping the gutter indicator nice (and using appropriate colors). --- book/src/themes.md | 3 +++ helix-view/src/gutter.rs | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/book/src/themes.md b/book/src/themes.md index 96d7c0ecac48..661210765fb6 100644 --- a/book/src/themes.md +++ b/book/src/themes.md @@ -245,9 +245,12 @@ We use a similar set of scopes as - `diff` - version control changes - `plus` - additions + - `gutter` - gutter indicator - `minus` - deletions + - `gutter` - gutter indicator - `delta` - modifications - `moved` - renamed or moved files/changes + - `gutter` - gutter indicator #### Interface diff --git a/helix-view/src/gutter.rs b/helix-view/src/gutter.rs index a332a8a324cc..397dff4f4782 100644 --- a/helix-view/src/gutter.rs +++ b/helix-view/src/gutter.rs @@ -94,9 +94,9 @@ pub fn diff<'doc>( theme: &Theme, _is_focused: bool, ) -> GutterFn<'doc> { - let added = theme.get("diff.plus"); - let deleted = theme.get("diff.minus"); - let modified = theme.get("diff.delta"); + let added = theme.get("diff.plus.gutter"); + let deleted = theme.get("diff.minus.gutter"); + let modified = theme.get("diff.delta.gutter"); if let Some(diff_handle) = doc.diff_handle() { let hunks = diff_handle.load(); let mut hunk_i = 0;