patch 9.1.0016: default diff highlighting is too noisy

Problem:  default diff highlighting is too noisy
Solution: Link diff highlighting groups to new
          Added/Removed/Changed, revert previous change
          (Romain Lafourcade)

Remove diff* links added in #13776 and doc added in commit b1392be

The links added in #13776 are way too noisy for the contexts in which
the `diff` syntax is applied (git commits, patches, etc.).

This commit:

- removes those links
- adds new default highlighting groups Added, Changed and
  Removed
- links the diff highlighting groups to those new defaults
- removes the doc changes
- adjusts the syntax_completion test for those newly added group
  names

Note: Changes to the default color schemes will be handled separately,
by adding links to those newly created Added/Removed/Changed
highlighting groups.

related: #13776
closes #13825

Signed-off-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Romain Lafourcade
2024-01-07 15:08:31 +01:00
committed by Christian Brabandt
parent b21499537f
commit 124371c5a1
7 changed files with 27 additions and 18 deletions

View File

@ -141,6 +141,10 @@ syn match helpTodo "\t[* ]Todo\t\+[a-z].*"
syn match helpURL `\v<(((https?|ftp|gopher)://|(mailto|file|news):)[^' <>"]+|(www|web|w3)[a-z0-9_-]*\.[a-z0-9._-]+\.[^' <>"]+)[a-zA-Z0-9/]`
syn match helpDiffAdded "\t[* ]Added\t\+[a-z].*"
syn match helpDiffChanged "\t[* ]Changed\t\+[a-z].*"
syn match helpDiffRemoved "\t[* ]Removed\t\+[a-z].*"
" Additionally load a language-specific syntax file "help_ab.vim".
let s:i = match(expand("%"), '\.\a\ax$')
if s:i > 0
@ -216,6 +220,9 @@ hi def link helpUnderlined Underlined
hi def link helpError Error
hi def link helpTodo Todo
hi def link helpURL String
hi def link helpDiffAdded Added
hi def link helpDiffChanged Changed
hi def link helpDiffRemoved Removed
if has('textprop') && expand('%:p') =~ '[/\\]doc[/\\]syntax.txt'
" highlight groups with their respective color