Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor syntax improvements pulled from Omnisharp's old syntax file #46

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions syntax/cs.vim
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ syn keyword csConditional else if switch
syn keyword csLabel case default
" :: is usually an error in C#, except for the special case of "global::"
syn match csOperatorError display +::+
syn match csGlobal display +global::+
syn match csGlobal display +global::+
" user labels (see [1] 8.6 Statements)
syn match csLabel display +^\s*\I\i*\s*:\([^:]\)\@=+
" modifier
syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile nextgroup=CsClass,CsIface skipwhite
syn keyword csModifier abstract const extern internal override private protected public readonly sealed static virtual volatile nextgroup=csClass,csIface skipwhite
" constant
syn keyword csConstant false null true
" exception
Expand All @@ -46,7 +46,7 @@ syn keyword csUnspecifiedKeyword explicit implicit
syn keyword csTypeOf typeof nextgroup=csEnclosed

" Linq Keywords
syn keyword csLinq from where select group into orderby join let in on equals by ascending descending
syn keyword csLinq ascending by descending equals from group in into join let on orderby select where

" Async Keywords
syn keyword csAsync async await
Expand All @@ -56,7 +56,7 @@ syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5
syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7
syn match csContextualStatement /\<\(get\|set\);/me=s+3
syn match csContextualStatement /\<\(get\|set\)[[:space:]\n]*{/me=s+3
syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
syn match csContextualStatement /\<where\>[^:]\+:/me=s+5

"New Declerations
syn keyword csNewDecleration new nextgroup=csClass skipwhite
Expand Down