summaryrefslogtreecommitdiffstats
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-05-06 17:57:30 +0200
committerBram Moolenaar <Bram@vim.org>2018-05-06 17:57:30 +0200
commit85eee130f44a2201d88ca2aeff0af3b11dd75fa9 (patch)
tree1748e216e4f90786b1a0789a054568976da40c42 /runtime/syntax
parent7ce551f317a0bb92f8c0521e96325301e2d220ca (diff)
Update runtime files.
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/cs.vim50
-rw-r--r--runtime/syntax/debchangelog.vim8
-rw-r--r--runtime/syntax/debcontrol.vim6
-rw-r--r--runtime/syntax/debcopyright.vim33
-rw-r--r--runtime/syntax/debsources.vim12
-rw-r--r--runtime/syntax/vhdl.vim20
6 files changed, 90 insertions, 39 deletions
diff --git a/runtime/syntax/cs.vim b/runtime/syntax/cs.vim
index 2ba629f921..111bc85dfe 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,11 +19,8 @@ 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
@@ -29,21 +28,16 @@ syn keyword csLabel case default
syn match csOperatorError display +::+
" 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
@@ -56,7 +50,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
@@ -89,8 +83,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 "\\."
@@ -113,7 +114,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
@@ -123,8 +128,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
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index e79fc9a31b..edaaf6128f 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -3,11 +3,11 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2018 Jan 06
+" Last Change: 2018 May 03
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
-if exists("b:current_syntax")
+if exists('b:current_syntax')
finish
endif
@@ -21,7 +21,7 @@ let s:binNMU='binary-only=yes'
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'
exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
-syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
+syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic|cosmic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
@@ -46,6 +46,6 @@ hi def link debchangelogVersion Identifier
hi def link debchangelogTarget Identifier
hi def link debchangelogEmail Special
-let b:current_syntax = "debchangelog"
+let b:current_syntax = 'debchangelog'
" vim: ts=8 sw=2
diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim
index 945812f25c..3504780445 100644
--- a/runtime/syntax/debcontrol.vim
+++ b/runtime/syntax/debcontrol.vim
@@ -3,11 +3,11 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2018 Jan 06
+" Last Change: 2018 Jan 28
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
" Standard syntax initialization
-if exists("b:current_syntax")
+if exists('b:current_syntax')
finish
endif
@@ -135,7 +135,7 @@ hi def link debcontrolR3 Identifier
hi def link debcontrolComment Comment
hi def link debcontrolElse Special
-let b:current_syntax = "debcontrol"
+let b:current_syntax = 'debcontrol'
let &cpo = s:cpo_save
unlet s:cpo_save
diff --git a/runtime/syntax/debcopyright.vim b/runtime/syntax/debcopyright.vim
new file mode 100644
index 0000000000..c85ca372d0
--- /dev/null
+++ b/runtime/syntax/debcopyright.vim
@@ -0,0 +1,33 @@
+" Vim syntax file
+" Language: Debian copyright file
+" Maintainer: Debian Vim Maintainers
+" Last Change: 2018 Feb 05
+" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcopyright.vim
+
+" Standard syntax initialization
+if exists('b:current_syntax')
+ finish
+endif
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+syn case match
+
+syn match debcopyrightUrl "\vhttps?://[[:alnum:]][-[:alnum:]]*[[:alnum:]]?(\.[[:alnum:]][-[:alnum:]]*[[:alnum:]]?)*\.[[:alpha:]][-[:alnum:]]*[[:alpha:]]?(:\d+)?(/[^[:space:]]*)?$"
+syn match debcopyrightKey "^\%(Format\|Upstream-Name\|Upstream-Contact\|Disclaimer\|Source\|Comment\|Files\|Copyright\|License\): *"
+syn match debcopyrightEmail "[_=[:alnum:]\.+-]\+@[[:alnum:]\./\-]\+"
+syn match debcopyrightEmail "<.\{-}>"
+syn match debcopyrightComment "^#.*$" contains=@Spell
+
+hi def link debcopyrightUrl Identifier
+hi def link debcopyrightKey Keyword
+hi def link debcopyrightEmail Identifier
+hi def link debcopyrightComment Comment
+
+let b:current_syntax = 'debcopyright'
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
+
+" vim: ts=8 sw=2
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index 4e136fa9e3..c7960c161b 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -2,11 +2,11 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2018 Jan 06
+" Last Change: 2018 May 03
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
-if exists("b:current_syntax")
+if exists('b:current_syntax')
finish
endif
@@ -25,7 +25,7 @@ let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy',
\
- \ 'trusty', 'xenial', 'zesty', 'artful', 'bionic', 'devel'
+ \ 'trusty', 'xenial', 'artful', 'bionic', 'cosmic', 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
@@ -34,12 +34,12 @@ let s:unsupported = [
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
- \ 'utopic', 'vivid', 'wily', 'yakkety'
+ \ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty'
\ ]
let &cpo=s:cpo
" Match uri's
-syn match debsourcesUri +\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\++
+syn match debsourcesUri '\(https\?://\|ftp://\|[rs]sh://\|debtorrent://\|\(cdrom\|copy\|file\):\)[^' <>"]\+'
exe 'syn match debsourcesDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:supported, '\|'). '\)\>\([-[:alnum:]_./]*\)+'
exe 'syn match debsourcesUnsupportedDistrKeyword +\([[:alnum:]_./]*\)\<\('. join(s:unsupported, '\|') .'\)\>\([-[:alnum:]_./]*\)+'
@@ -51,4 +51,4 @@ hi def link debsourcesUnsupportedDistrKeyword WarningMsg
hi def link debsourcesComment Comment
hi def link debsourcesUri Constant
-let b:current_syntax = "debsources"
+let b:current_syntax = 'debsources'
diff --git a/runtime/syntax/vhdl.vim b/runtime/syntax/vhdl.vim
index f4b11ff5dd..efcb840284 100644
--- a/runtime/syntax/vhdl.vim
+++ b/runtime/syntax/vhdl.vim
@@ -3,7 +3,7 @@
" Maintainer: Daniel Kho <daniel.kho@tauhop.com>
" Previous Maintainer: Czo <Olivier.Sirol@lip6.fr>
" Credits: Stephan Hegel <stephan.hegel@snc.siemens.com.cn>
-" Last Changed: 2016 Mar 05 by Daniel Kho
+" Last Changed: 2018 May 06 by Daniel Kho
" quit when a syntax file was already loaded
if exists("b:current_syntax")
@@ -43,6 +43,8 @@ syn keyword vhdlStatement sequence strong
syn keyword vhdlStatement then to transport type
syn keyword vhdlStatement unaffected units until use
syn keyword vhdlStatement variable
+" VHDL-2017 interface
+syn keyword vhdlStatement view
syn keyword vhdlStatement vmode vprop vunit
syn keyword vhdlStatement wait when while with
syn keyword vhdlStatement note warning error failure
@@ -69,9 +71,7 @@ syn match vhdlType "\<time_vector\>\'\="
syn match vhdlType "\<character\>\'\="
syn match vhdlType "\<string\>\'\="
-"syn keyword vhdlType severity_level
-syn keyword vhdlType line
-syn keyword vhdlType text
+syn keyword vhdlType line text side width
" Predefined standard IEEE VHDL types
syn match vhdlType "\<std_ulogic\>\'\="
@@ -124,6 +124,8 @@ syn match vhdlAttribute "\'succ"
syn match vhdlAttribute "\'val"
syn match vhdlAttribute "\'image"
syn match vhdlAttribute "\'value"
+" VHDL-2017 interface attribute
+syn match vhdlAttribute "\'converse"
syn keyword vhdlBoolean true false
@@ -165,6 +167,9 @@ syn match vhdlOperator "=\|\/=\|>\|<\|>="
syn match vhdlOperator "<=\|:="
syn match vhdlOperator "=>"
+" VHDL-2017 concurrent signal association (spaceship) operator
+syn match vhdlOperator "<=>"
+
" VHDL-2008 conversion, matching equality/non-equality operators
syn match vhdlOperator "??\|?=\|?\/=\|?<\|?<=\|?>\|?>="
@@ -183,8 +188,11 @@ syn match vhdlError "\(<\)[&+\-\/\\]\+"
syn match vhdlError "[>=&+\-\/\\]\+\(<\)"
" Covers most operators
" support negative sign after operators. E.g. q<=-b;
-syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|<=\|:=\|=>\)[<>=&+\*\\?:]\+"
-syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\|=>\)"
+" Supports VHDL-2017 spaceship (concurrent simple signal association).
+syn match vhdlError "\(<=\)[<=&+\*\\?:]\+"
+syn match vhdlError "[>=&+\-\*\\:]\+\(=>\)"
+syn match vhdlError "\(&\|+\|\-\|\*\*\|\/=\|??\|?=\|?\/=\|?<=\|?>=\|>=\|:=\|=>\)[<>=&+\*\\?:]\+"
+syn match vhdlError "[<>=&+\-\*\\:]\+\(&\|+\|\*\*\|\/=\|??\|?=\|?\/=\|?<\|?<=\|?>\|?>=\|>=\|<=\|:=\)"
syn match vhdlError "\(?<\|?>\)[<>&+\*\/\\?:]\+"
syn match vhdlError "\(<<\|>>\)[<>&+\*\/\\?:]\+"