diff --git a/syntax/NeogitCommitView.vim b/syntax/NeogitCommitView.vim index 80f063d17..bf962335b 100644 --- a/syntax/NeogitCommitView.vim +++ b/syntax/NeogitCommitView.vim @@ -5,25 +5,4 @@ endif syn match NeogitDiffAdd /.*/ contained syn match NeogitDiffDelete /.*/ contained -hi def link NeogitDiffAdd DiffAdd -hi def link NeogitDiffDelete DiffDelete - -hi def NeogitFilePath guifg=#798bf2 - -hi def NeogitCommitViewHeader guifg=#ffffff guibg=#94bbd1 - -hi def NeogitDiffHeader gui=bold - -sign define NeogitHunkHeader linehl=NeogitHunkHeader -sign define NeogitHunkHeader linehl=NeogitHunkHeader -sign define NeogitHunkHeaderHighlight linehl=NeogitHunkHeaderHighlight - -sign define NeogitDiffHeader linehl=NeogitDiffHeader -sign define NeogitDiffContextHighlight linehl=NeogitDiffContextHighlight -sign define NeogitDiffAdd linehl=NeogitDiffAdd -sign define NeogitDiffAddHighlight linehl=NeogitDiffAddHighlight -sign define NeogitDiffDelete linehl=NeogitDiffDelete -sign define NeogitDiffDeleteHighlight linehl=NeogitDiffDeleteHighlight - -sign define NeogitCommitViewHeader linehl=NeogitCommitViewHeader -sign define NeogitCommitViewDescription linehl=NeogitHunkHeader +let b:current_syntax = 1 diff --git a/syntax/NeogitGitCommandHistory.vim b/syntax/NeogitGitCommandHistory.vim deleted file mode 100644 index 4cf4bfc86..000000000 --- a/syntax/NeogitGitCommandHistory.vim +++ /dev/null @@ -1,4 +0,0 @@ -hi def link NeogitCommandText Comment -hi def link NeogitCommandTime Comment -hi NeogitCommandCodeNormal guifg=#80ff95 -hi NeogitCommandCodeError guifg=#c44323 diff --git a/syntax/NeogitLog.vim b/syntax/NeogitLog.vim index 574b038d1..520b2c8ee 100644 --- a/syntax/NeogitLog.vim +++ b/syntax/NeogitLog.vim @@ -3,3 +3,5 @@ if exists("b:current_syntax") endif syn match Comment /^[a-z0-9]\{7}\ze/ + +let b:current_syntax = 1 diff --git a/syntax/NeogitLogView.vim b/syntax/NeogitLogView.vim deleted file mode 100644 index a5e226816..000000000 --- a/syntax/NeogitLogView.vim +++ /dev/null @@ -1 +0,0 @@ -sign define NeogitLogViewCursorLine linehl=CursorLine diff --git a/syntax/NeogitNotification.vim b/syntax/NeogitNotification.vim deleted file mode 100644 index d9894b791..000000000 --- a/syntax/NeogitNotification.vim +++ /dev/null @@ -1,3 +0,0 @@ -hi def NeogitNotificationInfo guifg=#80ff95" -hi def NeogitNotificationWarning guifg=#fff454" -hi def NeogitNotificationError guifg=#c44323" diff --git a/syntax/NeogitPopup.vim b/syntax/NeogitPopup.vim deleted file mode 100644 index d08d02586..000000000 --- a/syntax/NeogitPopup.vim +++ /dev/null @@ -1,12 +0,0 @@ -hi def link NeogitPopupSectionTitle Function - -hi def link NeogitPopupSwitchKey Operator -hi def link NeogitPopupSwitchEnabled SpecialChar -hi def link NeogitPopupSwitchDisabled Comment - -hi def link NeogitPopupOptionKey Operator -hi def link NeogitPopupOptionEnabled SpecialChar -hi def link NeogitPopupOptionDisabled Comment - -hi def link NeogitPopupActionDisabled Comment -hi def link NeogitPopupActionKey Operator diff --git a/syntax/NeogitStatus.vim b/syntax/NeogitStatus.vim index 1047cf2a0..f66b99e39 100644 --- a/syntax/NeogitStatus.vim +++ b/syntax/NeogitStatus.vim @@ -1,18 +1,19 @@ if exists("b:current_syntax") finish endif + " Support the rebase todo highlights source $VIMRUNTIME/syntax/gitrebase.vim -syn match NeogitObjectId /^[a-z0-9]\{7,}\>/ -syn match NeogitCommitMessage /.*/ contained -syn match NeogitBranch /\S\+/ contained nextgroup=NeogitCommitMessage -syn match NeogitRemote /\S\+/ contained nextgroup=NeogitCommitMessage -syn match NeogitDiffAdd /.*/ contained -syn match NeogitDiffDelete /.*/ contained -syn match NeogitStash /stash@{[0-9]*}\ze/ -syn match NeogitUnmergedInto /Unmerged into/ contained -syn match NeogitUnpulledFrom /Unpulled from/ contained +syn match NeogitCommitMessage /.*/ contained +syn match NeogitBranch /\S\+/ contained nextgroup=NeogitCommitMessage +syn match NeogitRemote /\S\+/ contained nextgroup=NeogitCommitMessage +syn match NeogitDiffAdd /.*/ contained +syn match NeogitDiffDelete /.*/ contained +syn match NeogitUnmergedInto /Unmerged into/ contained +syn match NeogitUnpulledFrom /Unpulled from/ contained +syn match NeogitStash /stash@{[0-9]*}\ze/ +syn match NeogitObjectId /^[a-z0-9]\{7,}\>\s/ let b:sections = ["Untracked files", "Unstaged changes", "Unmerged changes", "Unpulled changes", "Recent commits", "Staged changes", "Stashes", "Rebasing"] @@ -20,39 +21,11 @@ for section in b:sections let id = join(split(section, " "), "") execute 'syn match Neogit' . id . ' /^' . section . '/ contained' execute 'syn region Neogit' . id . 'Region start=/^' . section . '\ze.*/ end=/./ contains=Neogit' . id - execute 'hi def link Neogit' . id . ' Function' endfor -syn region NeogitHeadRegion start=/^Head: \zs/ end=/$/ contains=NeogitBranch -syn region NeogitPushRegion start=/^Push: \zs/ end=/$/ contains=NeogitRemote +syn region NeogitHeadRegion start=/^Head: \zs/ end=/$/ contains=NeogitBranch +syn region NeogitPushRegion start=/^Push: \zs/ end=/$/ contains=NeogitRemote syn region NeogitUnmergedIntoRegion start=/^Unmerged into .*/ end=/$/ contains=NeogitRemote,NeogitUnmergedInto syn region NeogitUnpulledFromRegion start=/^Unpulled from .*/ end=/$/ contains=NeogitRemote,NeogitUnpulledFrom -syn region NeogitDiffAddRegion start=/^+.*$/ end=/$/ contains=NeogitDiffAdd -syn region NeogitDiffDeleteRegion start=/^-.*$/ end=/$/ contains=NeogitDiffDelete - -hi def link NeogitBranch Macro -hi def link NeogitRemote SpecialChar -hi def link NeogitObjectId Comment - -hi def link NeogitDiffAdd DiffAdd -hi def link NeogitDiffDelete DiffDelete - -hi def link NeogitUnmergedInto Function -hi def link NeogitUnpulledFrom Function - -hi def link NeogitStash Comment -hi def link NeogitRebaseDone Comment - -hi def NeogitFold guifg=None guibg=None - -sign define NeogitDiffContextHighlight linehl=NeogitDiffContextHighlight -sign define NeogitRebaseDone linehl=NeogitRebaseDone -sign define NeogitHunkHeader linehl=NeogitHunkHeader -sign define NeogitHunkHeaderHighlight linehl=NeogitHunkHeaderHighlight -sign define NeogitDiffAdd linehl=NeogitDiffAdd -sign define NeogitDiffAddHighlight linehl=NeogitDiffAddHighlight -sign define NeogitDiffDelete linehl=NeogitDiffDelete -sign define NeogitDiffDeleteHighlight linehl=NeogitDiffDeleteHighlight - - -"TODO: find a better way to do this +syn region NeogitDiffAddRegion start=/^+.*$/ end=/$/ contains=NeogitDiffAdd +syn region NeogitDiffDeleteRegion start=/^-.*$/ end=/$/ contains=NeogitDiffDelete