sindrets / diffview.nvim

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

Correct `enhanced_diff_hl` documentation #377

Closed vinnydiehl closed 1 year ago

vinnydiehl commented 1 year ago

I needed to do this for my colorscheme, figured I'd help the next guy out.

sindrets commented 1 year ago

The documentation describes the setting's functional effect. How the plugin achieves that function is an implementation detail, and does not belong in the user documentation. This change makes the docs less clear to the user.

In `diff2*` layouts this will highlight the delete fill-chars more subtly, and
show |hl-DiffAdd| in the old state buffer, as |hl-DiffviewDiffAddAsDelete|.

This line means nothing to a user. What is DiffviewDiffAddAsDelete? In the current docs the user can follow the tag link to the documentation for |hl-DiffDelete| in order to read about what that diff highlight applies to.

DiffviewDiffAddAsDelete inherits its values from DiffDelete, so as a color scheme creator you should only be changing DiffDelete regardless.

vinnydiehl commented 1 year ago

Ah. My mistake, cheers.