Skip to content

Commit c8af6d8

Browse files
authored
Merge pull request #504 from CKolkey/merge-upstream-5
Upstreaming 5/n - Cleanup syntax files
2 parents ca42848 + fc1a9a1 commit c8af6d8

File tree

7 files changed

+17
-83
lines changed

7 files changed

+17
-83
lines changed

syntax/NeogitCommitView.vim

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,4 @@ endif
55
syn match NeogitDiffAdd /.*/ contained
66
syn match NeogitDiffDelete /.*/ contained
77

8-
hi def link NeogitDiffAdd DiffAdd
9-
hi def link NeogitDiffDelete DiffDelete
10-
11-
hi def NeogitFilePath guifg=#798bf2
12-
13-
hi def NeogitCommitViewHeader guifg=#ffffff guibg=#94bbd1
14-
15-
hi def NeogitDiffHeader gui=bold
16-
17-
sign define NeogitHunkHeader linehl=NeogitHunkHeader
18-
sign define NeogitHunkHeader linehl=NeogitHunkHeader
19-
sign define NeogitHunkHeaderHighlight linehl=NeogitHunkHeaderHighlight
20-
21-
sign define NeogitDiffHeader linehl=NeogitDiffHeader
22-
sign define NeogitDiffContextHighlight linehl=NeogitDiffContextHighlight
23-
sign define NeogitDiffAdd linehl=NeogitDiffAdd
24-
sign define NeogitDiffAddHighlight linehl=NeogitDiffAddHighlight
25-
sign define NeogitDiffDelete linehl=NeogitDiffDelete
26-
sign define NeogitDiffDeleteHighlight linehl=NeogitDiffDeleteHighlight
27-
28-
sign define NeogitCommitViewHeader linehl=NeogitCommitViewHeader
29-
sign define NeogitCommitViewDescription linehl=NeogitHunkHeader
8+
let b:current_syntax = 1

syntax/NeogitGitCommandHistory.vim

Lines changed: 0 additions & 4 deletions
This file was deleted.

syntax/NeogitLog.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ if exists("b:current_syntax")
33
endif
44

55
syn match Comment /^[a-z0-9]\{7}\ze/
6+
7+
let b:current_syntax = 1

syntax/NeogitLogView.vim

Lines changed: 0 additions & 1 deletion
This file was deleted.

syntax/NeogitNotification.vim

Lines changed: 0 additions & 3 deletions
This file was deleted.

syntax/NeogitPopup.vim

Lines changed: 0 additions & 12 deletions
This file was deleted.

syntax/NeogitStatus.vim

Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,31 @@
11
if exists("b:current_syntax")
22
finish
33
endif
4+
45
" Support the rebase todo highlights
56
source $VIMRUNTIME/syntax/gitrebase.vim
67

7-
syn match NeogitObjectId /^[a-z0-9]\{7,}\>/
8-
syn match NeogitCommitMessage /.*/ contained
9-
syn match NeogitBranch /\S\+/ contained nextgroup=NeogitCommitMessage
10-
syn match NeogitRemote /\S\+/ contained nextgroup=NeogitCommitMessage
11-
syn match NeogitDiffAdd /.*/ contained
12-
syn match NeogitDiffDelete /.*/ contained
13-
syn match NeogitStash /stash@{[0-9]*}\ze/
14-
syn match NeogitUnmergedInto /Unmerged into/ contained
15-
syn match NeogitUnpulledFrom /Unpulled from/ contained
8+
syn match NeogitCommitMessage /.*/ contained
9+
syn match NeogitBranch /\S\+/ contained nextgroup=NeogitCommitMessage
10+
syn match NeogitRemote /\S\+/ contained nextgroup=NeogitCommitMessage
11+
syn match NeogitDiffAdd /.*/ contained
12+
syn match NeogitDiffDelete /.*/ contained
13+
syn match NeogitUnmergedInto /Unmerged into/ contained
14+
syn match NeogitUnpulledFrom /Unpulled from/ contained
15+
syn match NeogitStash /stash@{[0-9]*}\ze/
16+
syn match NeogitObjectId /^[a-z0-9]\{7,}\>\s/
1617

1718
let b:sections = ["Untracked files", "Unstaged changes", "Unmerged changes", "Unpulled changes", "Recent commits", "Staged changes", "Stashes", "Rebasing"]
1819

1920
for section in b:sections
2021
let id = join(split(section, " "), "")
2122
execute 'syn match Neogit' . id . ' /^' . section . '/ contained'
2223
execute 'syn region Neogit' . id . 'Region start=/^' . section . '\ze.*/ end=/./ contains=Neogit' . id
23-
execute 'hi def link Neogit' . id . ' Function'
2424
endfor
2525

26-
syn region NeogitHeadRegion start=/^Head: \zs/ end=/$/ contains=NeogitBranch
27-
syn region NeogitPushRegion start=/^Push: \zs/ end=/$/ contains=NeogitRemote
26+
syn region NeogitHeadRegion start=/^Head: \zs/ end=/$/ contains=NeogitBranch
27+
syn region NeogitPushRegion start=/^Push: \zs/ end=/$/ contains=NeogitRemote
2828
syn region NeogitUnmergedIntoRegion start=/^Unmerged into .*/ end=/$/ contains=NeogitRemote,NeogitUnmergedInto
2929
syn region NeogitUnpulledFromRegion start=/^Unpulled from .*/ end=/$/ contains=NeogitRemote,NeogitUnpulledFrom
30-
syn region NeogitDiffAddRegion start=/^+.*$/ end=/$/ contains=NeogitDiffAdd
31-
syn region NeogitDiffDeleteRegion start=/^-.*$/ end=/$/ contains=NeogitDiffDelete
32-
33-
hi def link NeogitBranch Macro
34-
hi def link NeogitRemote SpecialChar
35-
hi def link NeogitObjectId Comment
36-
37-
hi def link NeogitDiffAdd DiffAdd
38-
hi def link NeogitDiffDelete DiffDelete
39-
40-
hi def link NeogitUnmergedInto Function
41-
hi def link NeogitUnpulledFrom Function
42-
43-
hi def link NeogitStash Comment
44-
hi def link NeogitRebaseDone Comment
45-
46-
hi def NeogitFold guifg=None guibg=None
47-
48-
sign define NeogitDiffContextHighlight linehl=NeogitDiffContextHighlight
49-
sign define NeogitRebaseDone linehl=NeogitRebaseDone
50-
sign define NeogitHunkHeader linehl=NeogitHunkHeader
51-
sign define NeogitHunkHeaderHighlight linehl=NeogitHunkHeaderHighlight
52-
sign define NeogitDiffAdd linehl=NeogitDiffAdd
53-
sign define NeogitDiffAddHighlight linehl=NeogitDiffAddHighlight
54-
sign define NeogitDiffDelete linehl=NeogitDiffDelete
55-
sign define NeogitDiffDeleteHighlight linehl=NeogitDiffDeleteHighlight
56-
57-
58-
"TODO: find a better way to do this
30+
syn region NeogitDiffAddRegion start=/^+.*$/ end=/$/ contains=NeogitDiffAdd
31+
syn region NeogitDiffDeleteRegion start=/^-.*$/ end=/$/ contains=NeogitDiffDelete

0 commit comments

Comments
 (0)