sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.85k stars 105 forks source link

Separate highlights for file and panel #293

Closed AlexvZyl closed 1 year ago

AlexvZyl commented 1 year ago

Hi there!

I am working on a colorscheme and creating diff colors is turning out to be interesting. The best I could adjust the colors lead to it looking like this:

image

This looks okay, but it is quite different to what is usually done. This leads to the panel looking like this:

image

I am assuming this is because the diff colors are used in the panel. I can solve this by changing the panel colors using the BuffEnter event, but was wondering if you would be keen to use separate highlights for the panel?

AlexvZyl commented 1 year ago

P.S. I decided to use the diff colors as the foreground since I do not like the way the colors look when darkened or blended with the background.

sindrets commented 1 year ago

No, the diff-mode related highlights are not used in the panel. You can find all the highlights defined by this plugin by running:

:filter /^Diffview/ hi

Perhaps you have linked diffChanged -> DiffChange, diffAdded -> DiffAdd, etc.... These are not synonymous. The diff* (with lower case d) highlights are defined by the builtin syntax file for the diff file type. Where as the Diff* highlights are used for diff-mode.

Btw, if you're on nvim nightly you can use the :Inspect command to find the extmark highlights under the cursor.

AlexvZyl commented 1 year ago

Ah I see, thank you!