Skip to content

DiffDelete highlight used in expected places #340

@egargan

Description

@egargan

There are a few situations where Diffview uses the DiffDelete highlight group, where it seems it'd make more sense to use DiffviewDiffDelete or DiffviewDiffAddAsDelete.

I have my coloursheme set up as follows.

highlights["DiffDelete"] = { bg = "#5A424D", fg = "none" } -- Red
highlights["DiffviewDiffAddAsDelete"] = { bg = "none", fg = "#4C566A" } -- Dark grey
highlights["DiffviewDiffDelete"] = { bg = "none", fg = "#4C566A" } -- Dark grey
highlights["DiffAdd"] = { bg = "#45504F" } -- Green
highlights["DiffChange"] = { bg = "#54524F" } -- Yellow
highlights["DiffText"] = { bg = "#70695A" } -- Lighter yellow

This looks great for the most part, for files with single or few-line diffs, e.g.

But when diffs span entire files, e.g. when a file is added, it appears DiffDelete is applied, which seems inappropriate.

The same goes for files that have been deleted...
As well as merge conflict views...

Do you think it'd make sense to change the highlight groups used in these scenarios? Or can you suggest another change that might fix these odd-looking colours? Happy to have a go myself with a bit of guidance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions