aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2024-01-10 18:45:46 +0100
committerChristian Clason <c.clason@uni-graz.at>2024-01-12 13:52:26 +0100
commitf46ae1368530389129b5f7f1768c057d5d0b9c2f (patch)
tree1b2f15d93aca78a202a599a59dc114f60701891e /runtime/syntax
parent3bcf8e5622f29a65564bf2f7672997432e183dfa (diff)
downloadrneovim-f46ae1368530389129b5f7f1768c057d5d0b9c2f.tar.gz
rneovim-f46ae1368530389129b5f7f1768c057d5d0b9c2f.tar.bz2
rneovim-f46ae1368530389129b5f7f1768c057d5d0b9c2f.zip
vim-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 vim/vim#13776 and doc added in commit b1392be The links added in vim/vim#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: vim/vim#13776 closes vim/vim#13825 https://github.com/vim/vim/commit/124371c5a149a8c0c75c04b6c90ac11e71a0aa97 Co-authored-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/diff.vim6
-rw-r--r--runtime/syntax/help.vim7
2 files changed, 10 insertions, 3 deletions
diff --git a/runtime/syntax/diff.vim b/runtime/syntax/diff.vim
index b5c3f5ecbb..b0a8594def 100644
--- a/runtime/syntax/diff.vim
+++ b/runtime/syntax/diff.vim
@@ -378,9 +378,9 @@ hi def link diffBDiffer Constant
hi def link diffIsA Constant
hi def link diffNoEOL Constant
hi def link diffCommon Constant
-hi def link diffRemoved DiffDelete
-hi def link diffChanged DiffChange
-hi def link diffAdded DiffAdd
+hi def link diffRemoved Removed
+hi def link diffChanged Changed
+hi def link diffAdded Added
hi def link diffLine Statement
hi def link diffSubname PreProc
hi def link diffComment Comment
diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim
index f1e650b2fb..fced5e7dd1 100644
--- a/runtime/syntax/help.vim
+++ b/runtime/syntax/help.vim
@@ -136,6 +136,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
@@ -209,6 +213,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
let b:current_syntax = "help"