aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/cs.vim
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-10-29 08:43:13 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-10-29 09:17:43 +0100
commitc05b0d8ec7a29b29ca36a78041cb67eefc146b30 (patch)
tree6d4397f7f59f29ca6a8986b68b6fec50d9447662 /runtime/syntax/cs.vim
parent875a1bcf0adb2c223e80c492ee102d322774fd46 (diff)
downloadrneovim-c05b0d8ec7a29b29ca36a78041cb67eefc146b30.tar.gz
rneovim-c05b0d8ec7a29b29ca36a78041cb67eefc146b30.tar.bz2
rneovim-c05b0d8ec7a29b29ca36a78041cb67eefc146b30.zip
vim-patch:85eee130f44a
Update runtime files. https://github.com/vim/vim/commit/85eee130f44a2201d88ca2aeff0af3b11dd75fa9
Diffstat (limited to 'runtime/syntax/cs.vim')
-rw-r--r--runtime/syntax/cs.vim50
1 files changed, 30 insertions, 20 deletions
diff --git a/runtime/syntax/cs.vim b/runtime/syntax/cs.vim
index 0443a1ff3d..9977ec03e3 100644
--- a/runtime/syntax/cs.vim
+++ b/runtime/syntax/cs.vim
@@ -1,10 +1,12 @@
" Vim syntax file
-" Language: C#
-" Maintainer: Anduin Withers <awithers@anduin.com>
+" Language: C#
+" Maintainer: Nick Jensen <nickspoon@gmail.com>
+" Former Maintainer: Anduin Withers <awithers@anduin.com>
" Former Maintainer: Johannes Zellner <johannes@zellner.org>
-" Last Change: Fri Aug 14 13:56:37 PDT 2009
-" Filenames: *.cs
-" $Id: cs.vim,v 1.4 2006/05/03 21:20:02 vimboss Exp $
+" Last Change: 2018-05-02
+" Filenames: *.cs
+" License: Vim (see :h license)
+" Repository: https://github.com/nickspoons/vim-cs
"
" REFERENCES:
" [1] ECMA TC39: C# Language Specification (WD13Oct01.doc)
@@ -17,31 +19,23 @@ let s:cs_cpo_save = &cpo
set cpo&vim
-" type
-syn keyword csType bool byte char decimal double float int long object sbyte short string uint ulong ushort void
-" storage
-syn keyword csStorage class delegate enum interface namespace struct
-" repeat / condition / label
+syn keyword csType bool byte char decimal double float int long object sbyte short string T uint ulong ushort var void dynamic
+syn keyword csStorage delegate enum interface namespace struct
syn keyword csRepeat break continue do for foreach goto return while
syn keyword csConditional else if switch
syn keyword csLabel case default
" 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
-" constant
syn keyword csConstant false null true
-" exception
-syn keyword csException try catch finally throw
+syn keyword csException try catch finally throw when
+syn keyword csLinq ascending by descending equals from group in into join let on orderby select where
+syn keyword csAsync async await
-" TODO:
-syn keyword csUnspecifiedStatement as base checked event fixed in is lock new operator out params ref sizeof stackalloc this typeof unchecked unsafe using
-" TODO:
+syn keyword csUnspecifiedStatement as base checked event fixed get in is lock nameof operator out params ref set sizeof stackalloc this typeof unchecked unsafe using
syn keyword csUnsupportedStatement add remove value
-" TODO:
syn keyword csUnspecifiedKeyword explicit implicit
-
" Contextual Keywords
syn match csContextualStatement /\<yield[[:space:]\n]\+\(return\|break\)/me=s+5
syn match csContextualStatement /\<partial[[:space:]\n]\+\(class\|struct\|interface\)/me=s+7
@@ -54,7 +48,7 @@ syn match csContextualStatement /\<where\>[^:]\+:/me=s+5
"
" TODO: include strings ?
"
-syn keyword csTodo contained TODO FIXME XXX NOTE
+syn keyword csTodo contained TODO FIXME XXX NOTE HACK
syn region csComment start="/\*" end="\*/" contains=@csCommentHook,csTodo,@Spell
syn match csComment "//.*$" contains=@csCommentHook,csTodo,@Spell
@@ -87,8 +81,15 @@ syn region csPreCondit
\ skip="\\$" end="$" contains=csComment keepend
syn region csRegion matchgroup=csPreCondit start="^\s*#\s*region.*$"
\ end="^\s*#\s*endregion" transparent fold contains=TOP
+syn region csSummary start="^\s*/// <summary" end="^\(\s*///\)\@!" transparent fold keepend
+syn region csClassType start="\(@\)\@<!class\>"hs=s+6 end="[:\n{]"he=e-1 contains=csClass
+syn region csNewType start="\(@\)\@<!new\>"hs=s+4 end="[\(\<{\[]"he=e-1 contains=csNew contains=csNewType
+syn region csIsType start="\v (is|as) "hs=s+4 end="\v[A-Za-z0-9]+" oneline contains=csIsAs
+syn keyword csNew new contained
+syn keyword csClass class contained
+syn keyword csIsAs is as
" Strings and constants
syn match csSpecialError contained "\\."
@@ -111,7 +112,11 @@ syn match csNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
" The default highlighting.
hi def link csType Type
+hi def link csNewType Type
+hi def link csClassType Type
+hi def link csIsType Type
hi def link csStorage StorageClass
+hi def link csClass StorageClass
hi def link csRepeat Repeat
hi def link csConditional Conditional
hi def link csLabel Label
@@ -121,8 +126,13 @@ hi def link csException Exception
hi def link csUnspecifiedStatement Statement
hi def link csUnsupportedStatement Statement
hi def link csUnspecifiedKeyword Keyword
+hi def link csNew Statement
+hi def link csLinq Statement
+hi def link csIsAs Keyword
+hi def link csAsync Keyword
hi def link csContextualStatement Statement
hi def link csOperatorError Error
+hi def link csInterfaceDeclaration Include
hi def link csTodo Todo
hi def link csComment Comment