diff options
Diffstat (limited to 'syntax')
-rw-r--r-- | syntax/csv.vim | 29 | ||||
-rw-r--r-- | syntax/elixir.vim | 5 | ||||
-rw-r--r-- | syntax/eruby.vim | 2 | ||||
-rw-r--r-- | syntax/go.vim | 12 | ||||
-rw-r--r-- | syntax/html.vim | 3 | ||||
-rw-r--r-- | syntax/javascript.vim | 49 | ||||
-rw-r--r-- | syntax/mustache.vim | 4 | ||||
-rw-r--r-- | syntax/rust.vim | 72 | ||||
-rw-r--r-- | syntax/typescript.vim | 4 |
9 files changed, 72 insertions, 108 deletions
diff --git a/syntax/csv.vim b/syntax/csv.vim index e2da7dbc..543a9fe9 100644 --- a/syntax/csv.vim +++ b/syntax/csv.vim @@ -139,35 +139,6 @@ fu! <sid>DoSyntaxDefinitions() "{{{3 hi def link CSVColumnHeaderEven WarningMsg hi def link CSVColumnOdd DiffAdd hi def link CSVColumnEven DiffChange - " Old Version - if 0 - if &t_Co < 88 - if !exists("b:csv_fixed_width_cols") - hi default CSVColumnHeaderOdd ctermfg=DarkRed ctermbg=15 - \ guibg=grey80 guifg=black term=underline cterm=standout,bold - \ gui=bold,underline - endif - hi default CSVColumnOdd ctermfg=DarkRed ctermbg=15 guibg=grey80 - \ guifg=black term=underline cterm=bold gui=underline - else - if !exists("b:csv_fixed_width_cols") - hi default CSVColumnHeaderOdd ctermfg=darkblue ctermbg=white - \ guibg=grey80 guifg=black cterm=standout,underline - \ gui=bold,underline - endif - hi default CSVColumnOdd ctermfg=darkblue ctermbg=white guibg=grey80 - \ guifg=black cterm=reverse,underline gui=underline - endif - - " ctermbg=8 should be safe, even in 8 color terms - if !exists("b:csv_fixed_width_cols") - hi default CSVColumnHeaderEven ctermfg=white ctermbg=darkgrey - \ guibg=grey50 guifg=black term=bold cterm=standout,underline - \ gui=bold,underline - endif - hi default CSVColumnEven ctermfg=white ctermbg=darkgrey guibg=grey50 - \ guifg=black term=bold cterm=underline gui=bold,underline - endif endfun " Main: {{{2 diff --git a/syntax/elixir.vim b/syntax/elixir.vim index f7035633..c6818f29 100644 --- a/syntax/elixir.vim +++ b/syntax/elixir.vim @@ -22,6 +22,8 @@ syn keyword elixirKeyword quote unquote super syn keyword elixirInclude import require alias use +syn keyword elixirSelf self + syn match elixirId '\<[_a-zA-Z]\w*[!?]\?\>' " This unfortunately also matches function names in function calls @@ -68,7 +70,7 @@ syn region elixirRegex matchgroup=elixirRegexDelimiter start="%r/" end="/[uiomxf syn cluster elixirRegexSpecial contains=elixirRegexEscape,elixirRegexCharClass,elixirRegexQuantifier,elixirRegexEscapePunctuation syn cluster elixirStringContained contains=elixirInterpolation,elixirRegexEscape,elixirRegexCharClass -syn region elixirString matchgroup=elixirStringDelimiter start="'" end="'" skip="\\'" +syn region elixirString matchgroup=elixirStringDelimiter start="'" end="'" skip="\\'|\\\\" syn region elixirString matchgroup=elixirStringDelimiter start='"' end='"' skip='\\"' contains=@elixirStringContained syn region elixirInterpolation matchgroup=elixirInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,elixirComment,@elixirNotTop @@ -160,6 +162,7 @@ hi def link elixirPseudoVariable Constant hi def link elixirAlias Type hi def link elixirBoolean Boolean hi def link elixirVariable Identifier +hi def link elixirSelf Identifier hi def link elixirUnusedVariable Comment hi def link elixirNumber Number hi def link elixirDocString String diff --git a/syntax/eruby.vim b/syntax/eruby.vim index c20b086b..4e175bcc 100644 --- a/syntax/eruby.vim +++ b/syntax/eruby.vim @@ -22,7 +22,7 @@ elseif !exists("b:eruby_subtype") && main_syntax == 'eruby' let s:lines = getline(1)."\n".getline(2)."\n".getline(3)."\n".getline(4)."\n".getline(5)."\n".getline("$") let b:eruby_subtype = matchstr(s:lines,'eruby_subtype=\zs\w\+') if b:eruby_subtype == '' - let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+$') + let b:eruby_subtype = matchstr(substitute(expand("%:t"),'\c\%(\.erb\|\.eruby\|\.erubis\)\+$','',''),'\.\zs\w\+\%(\ze+\w\+\)\=$') endif if b:eruby_subtype == 'rhtml' let b:eruby_subtype = 'html' diff --git a/syntax/go.vim b/syntax/go.vim index 59f72ed7..4ee39a71 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -10,7 +10,9 @@ " let OPTION_NAME = 0 " in your ~/.vimrc file to disable particular options. You can also write: " let OPTION_NAME = 1 -" to enable particular options. At present, all options default to on. +" to enable particular options. +" At present, all options default to on, except highlight of: +" functions, methods and structs. " " - go_highlight_array_whitespace_error " Highlights white space after "[]". @@ -107,10 +109,10 @@ syn match goDeclaration /\<func\>/ " Predefined functions and values syn keyword goBuiltins append cap close complex copy delete imag len syn keyword goBuiltins make new panic print println real recover -syn keyword goConstants iota true false nil +syn keyword goBoolean iota true false nil hi def link goBuiltins Keyword -hi def link goConstants Keyword +hi def link goBoolean Boolean " Comments; their contents syn keyword goTodo contained TODO FIXME XXX BUG @@ -141,9 +143,11 @@ hi def link goEscapeError Error syn cluster goStringGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU,goEscapeError syn region goString start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@goStringGroup syn region goRawString start=+`+ end=+`+ +syn match goFormatSpecifier /%[#0\-\ \+\*]*[vTtbcdoqxXUeEfgGsp]/ contained containedin=goString hi def link goString String hi def link goRawString String +hi def link goFormatSpecifier goSpecialString " Characters; their contents syn cluster goCharacterGroup contains=goEscapeOctal,goEscapeC,goEscapeX,goEscapeU,goEscapeBigU @@ -199,7 +203,7 @@ endif " Extra types commonly seen if g:go_highlight_extra_types != 0 syn match goExtraType /\<bytes\.\(Buffer\)\>/ - syn match goExtraType /\<io\.\(Reader\|Writer\|ReadWriter\|ReadWriteCloser\)\>/ + syn match goExtraType /\<io\.\(Reader\|ReadSeeker\|ReadWriter\|ReadCloser\|ReadWriteCloser\|Writer\|WriteCloser\|Seeker\)\>/ syn match goExtraType /\<reflect\.\(Kind\|Type\|Value\)\>/ syn match goExtraType /\<unsafe\.Pointer\>/ endif diff --git a/syntax/html.vim b/syntax/html.vim index 78da84f0..3e9beea4 100644 --- a/syntax/html.vim +++ b/syntax/html.vim @@ -24,6 +24,7 @@ syn keyword htmlTagName contained header hgroup keygen main mark meter menu nav syn keyword htmlTagName contained progress ruby rt rp section source summary time track video data syn keyword htmlTagName contained template content shadow syn keyword htmlTagName contained wbr bdi +syn keyword htmlTagName contained picture " SVG tags " http://www.w3.org/TR/SVG/ @@ -75,6 +76,8 @@ syn keyword htmlArg contained label icon open datetime pubdate syn keyword htmlArg contained async " <content> syn keyword htmlArg contained select +" <picture> +syn keyword htmlArg contained srcset sizes " Custom Data Attributes " http://dev.w3.org/html5/spec/elements.html#embedding-custom-non-visible-data diff --git a/syntax/javascript.vim b/syntax/javascript.vim index 7d27707e..beb6b527 100644 --- a/syntax/javascript.vim +++ b/syntax/javascript.vim @@ -35,6 +35,7 @@ syntax keyword jsOperator delete instanceof typeof void new in syntax match jsOperator /\(!\||\|&\|+\|-\|<\|>\|=\|%\|\/\|*\|\~\|\^\)/ syntax keyword jsBooleanTrue true syntax keyword jsBooleanFalse false +syntax keyword jsCommonJS require module exports "" JavaScript comments syntax keyword jsCommentTodo TODO FIXME XXX TBD contained @@ -55,15 +56,15 @@ if !exists("javascript_ignore_javaScriptdoc") syntax region jsDocComment matchgroup=jsComment start="/\*\*\s*" end="\*/" contains=jsDocTags,jsCommentTodo,jsCvsTag,@jsHtml,@Spell fold " tags containing a param - syntax match jsDocTags contained "@\(alias\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|member[oO]f\|mixes\|module\|name\|namespace\|requires\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite + syntax match jsDocTags contained "@\(alias\|augments\|borrows\|class\|constructs\|default\|defaultvalue\|emits\|exception\|exports\|extends\|file\|fires\|kind\|listens\|member\|member[oO]f\|mixes\|module\|name\|namespace\|requires\|template\|throws\|var\|variation\|version\)\>" nextgroup=jsDocParam skipwhite " tags containing type and param syntax match jsDocTags contained "@\(arg\|argument\|param\|property\)\>" nextgroup=jsDocType skipwhite " tags containing type but no param - syntax match jsDocTags contained "@\(callback\|enum\|external\|this\|type\|typedef\|return\|returns\)\>" nextgroup=jsDocTypeNoParam skipwhite + syntax match jsDocTags contained "@\(callback\|define\|enum\|external\|implements\|this\|type\|typedef\|return\|returns\)\>" nextgroup=jsDocTypeNoParam skipwhite " tags containing references syntax match jsDocTags contained "@\(lends\|see\|tutorial\)\>" nextgroup=jsDocSeeTag skipwhite " other tags (no extra syntax) - syntax match jsDocTags contained "@\(abstract\|access\|author\|classdesc\|constant\|const\|constructor\|copyright\|deprecated\|desc\|description\|event\|example\|file[oO]verview\|function\|global\|ignore\|inner\|instance\|license\|method\|mixin\|overview\|private\|protected\|public\|readonly\|since\|static\|todo\|summary\|undocumented\|virtual\)\>" + syntax match jsDocTags contained "@\(abstract\|access\|author\|classdesc\|constant\|const\|constructor\|copyright\|deprecated\|desc\|description\|dict\|event\|example\|file[oO]verview\|final\|function\|global\|ignore\|inheritDoc\|inner\|instance\|interface\|license\|method\|mixin\|nosideeffects\|override\|overview\|preserve\|private\|protected\|public\|readonly\|since\|static\|struct\|todo\|summary\|undocumented\|virtual\)\>" syntax region jsDocType start="{" end="}" oneline contained nextgroup=jsDocParam skipwhite syntax match jsDocType contained "\%(#\|\"\|\w\|\.\|:\|\/\)\+" nextgroup=jsDocParam skipwhite @@ -81,9 +82,9 @@ syntax case match syntax match jsFuncCall /\k\+\%(\s*(\)\@=/ syntax match jsSpecial "\v\\%(0|\\x\x\{2\}\|\\u\x\{4\}\|\c[A-Z]|.)" contained syntax match jsTemplateVar "\${.\{-}}" contained -syntax region jsStringD start=+"+ skip=+\\\\\|\\$"+ end=+"+ contains=jsSpecial,@htmlPreproc,@Spell -syntax region jsStringS start=+'+ skip=+\\\\\|\\$'+ end=+'+ contains=jsSpecial,@htmlPreproc,@Spell -syntax region jsTemplateString start=+`+ skip=+\\\\\|\\$`+ end=+`+ contains=jsTemplateVar,jsSpecial,@htmlPreproc +syntax region jsStringD start=+"+ skip=+\\\("\|$\)+ end=+"\|$+ contains=jsSpecial,@htmlPreproc,@Spell +syntax region jsStringS start=+'+ skip=+\\\('\|$\)+ end=+'\|$+ contains=jsSpecial,@htmlPreproc,@Spell +syntax region jsTemplateString start=+`+ skip=+\\\(`\|$\)+ end=+`\|$+ contains=jsTemplateVar,jsSpecial,@htmlPreproc syntax region jsRegexpCharClass start=+\[+ skip=+\\.+ end=+\]+ contained syntax match jsRegexpBoundary "\v%(\<@![\^$]|\\[bB])" contained syntax match jsRegexpBackRef "\v\\[1-9][0-9]*" contained @@ -91,7 +92,7 @@ syntax match jsRegexpQuantifier "\v\\@<!%([?*+]|\{\d+%(,|,\d+)?})\??" containe syntax match jsRegexpOr "\v\<@!\|" contained syntax match jsRegexpMod "\v\(@<=\?[:=!>]" contained syntax cluster jsRegexpSpecial contains=jsSpecial,jsRegexpBoundary,jsRegexpBackRef,jsRegexpQuantifier,jsRegexpOr,jsRegexpMod -syntax region jsRegexpGroup start="\\\@<!(" end="\\\@<!)" contained contains=jsRegexpCharClass,@jsRegexpSpecial keepend +syntax region jsRegexpGroup start="\\\@<!(" skip="\\.\|\[\(\\.\|[^]]\)*\]" end="\\\@<!)" contained contains=jsRegexpCharClass,@jsRegexpSpecial keepend syntax region jsRegexpString start=+\(\(\(return\|case\)\s\+\)\@<=\|\(\([)\]"']\|\d\|\w\)\s*\)\@<!\)/\(\*\|/\)\@!+ skip=+\\.\|\[\(\\.\|[^]]\)*\]+ end=+/[gimy]\{,4}+ contains=jsRegexpCharClass,jsRegexpGroup,@jsRegexpSpecial,@htmlPreproc oneline keepend syntax match jsNumber /\<-\=\d\+L\=\>\|\<0[xX]\x\+\>/ syntax keyword jsNumber Infinity @@ -99,28 +100,19 @@ syntax match jsFloat /\<-\=\%(\d\+\.\d\+\|\d\+\.\|\.\d\+\)\%([eE][+- syntax match jsObjectKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\(\s*:\)\@=/ contains=jsFunctionKey contained syntax match jsFunctionKey /\<[a-zA-Z_$][0-9a-zA-Z_$]*\(\s*:\s*function\s*\)\@=/ contained -if g:javascript_conceal == 1 - syntax keyword jsNull null conceal cchar=ø - syntax keyword jsThis this conceal cchar=@ - syntax keyword jsReturn return conceal cchar=⇚ - syntax keyword jsUndefined undefined conceal cchar=¿ - syntax keyword jsNan NaN conceal cchar=ℕ - syntax keyword jsPrototype prototype conceal cchar=¶ -else - syntax keyword jsNull null - syntax keyword jsThis this - syntax keyword jsReturn return - syntax keyword jsUndefined undefined - syntax keyword jsNan NaN - syntax keyword jsPrototype prototype -endif +exe 'syntax keyword jsNull null '.(exists('g:javascript_conceal_null') ? 'conceal cchar='.g:javascript_conceal_null : '') +exe 'syntax keyword jsReturn return '.(exists('g:javascript_conceal_return') ? 'conceal cchar='.g:javascript_conceal_return : '') +exe 'syntax keyword jsUndefined undefined '.(exists('g:javascript_conceal_undefined') ? 'conceal cchar='.g:javascript_conceal_undefined : '') +exe 'syntax keyword jsNan NaN '.(exists('g:javascript_conceal_NaN') ? 'conceal cchar='.g:javascript_conceal_NaN : '') +exe 'syntax keyword jsPrototype prototype '.(exists('g:javascript_conceal_prototype') ? 'conceal cchar='.g:javascript_conceal_prototype : '') +exe 'syntax keyword jsThis this '.(exists('g:javascript_conceal_this') ? 'conceal cchar='.g:javascript_conceal_this : '') "" Statement Keywords syntax keyword jsStatement break continue with syntax keyword jsConditional if else switch syntax keyword jsRepeat do while for syntax keyword jsLabel case default -syntax keyword jsKeyword yield +syntax keyword jsKeyword yield import export default extends class syntax keyword jsException try catch throw finally syntax keyword jsGlobalObjects Array Boolean Date Function Iterator Number Object RegExp String Proxy ParallelArray ArrayBuffer DataView Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray Intl JSON Math console document window @@ -130,7 +122,7 @@ syntax keyword jsExceptions Error EvalError InternalError RangeError Referen syntax keyword jsBuiltins decodeURI decodeURIComponent encodeURI encodeURIComponent eval isFinite isNaN parseFloat parseInt uneval -syntax keyword jsFutureKeys abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws goto private transient debugger implements protected volatile double import public +syntax keyword jsFutureKeys abstract enum int short boolean interface static byte long super char final native synchronized float package throws goto private transient debugger implements protected volatile double public "" DOM/HTML/CSS specified things @@ -182,7 +174,7 @@ endif "DOM/HTML/CSS "" Code blocks -syntax cluster jsExpression contains=jsComment,jsLineComment,jsDocComment,jsTemplateString,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsDotNotation,jsBracket,jsParen,jsBlock,jsFuncCall,jsUndefined,jsNan,jsKeyword,jsStorageClass,jsPrototype,jsBuiltins,jsNoise +syntax cluster jsExpression contains=jsComment,jsLineComment,jsDocComment,jsTemplateString,jsStringD,jsStringS,jsRegexpString,jsNumber,jsFloat,jsThis,jsOperator,jsBooleanTrue,jsBooleanFalse,jsNull,jsFunction,jsArrowFunction,jsGlobalObjects,jsExceptions,jsFutureKeys,jsDomErrNo,jsDomNodeConsts,jsHtmlEvents,jsDotNotation,jsBracket,jsParen,jsBlock,jsFuncCall,jsUndefined,jsNan,jsKeyword,jsStorageClass,jsPrototype,jsBuiltins,jsNoise,jsCommonJS syntax cluster jsAll contains=@jsExpression,jsLabel,jsConditional,jsRepeat,jsReturn,jsStatement,jsTernaryIf,jsException syntax region jsBracket matchgroup=jsBrackets start="\[" end="\]" contains=@jsAll,jsParensErrB,jsParensErrC,jsBracket,jsParen,jsBlock,@htmlPreproc fold syntax region jsParen matchgroup=jsParens start="(" end=")" contains=@jsAll,jsParensErrA,jsParensErrC,jsParen,jsBracket,jsBlock,@htmlPreproc fold @@ -202,11 +194,7 @@ if main_syntax == "javascript" syntax sync match jsHighlight grouphere jsBlock /{/ endif -if g:javascript_conceal == 1 - syntax match jsFunction /\<function\>/ nextgroup=jsFuncName,jsFuncArgs skipwhite conceal cchar=ƒ -else - syntax match jsFunction /\<function\>/ nextgroup=jsFuncName,jsFuncArgs skipwhite -endif +exe 'syntax match jsFunction /\<function\>/ nextgroup=jsFuncName,jsFuncArgs skipwhite '.(exists('g:javascript_conceal_function') ? 'conceal cchar='.g:javascript_conceal_function : '') syntax match jsFuncName contained /\<[a-zA-Z_$][0-9a-zA-Z_$]*/ nextgroup=jsFuncArgs skipwhite syntax region jsFuncArgs contained matchgroup=jsFuncParens start='(' end=')' contains=jsFuncArgCommas,jsFuncArgRest nextgroup=jsFuncBlock keepend skipwhite skipempty @@ -291,6 +279,7 @@ if version >= 508 || !exists("did_javascript_syn_inits") HiLink jsExceptions Special HiLink jsFutureKeys Special HiLink jsBuiltins Special + HiLink jsCommonJS Include HiLink jsDomErrNo Constant HiLink jsDomNodeConsts Constant diff --git a/syntax/mustache.vim b/syntax/mustache.vim index 8f1d0a0f..ec7d4fe5 100644 --- a/syntax/mustache.vim +++ b/syntax/mustache.vim @@ -50,8 +50,8 @@ syntax match mustacheHandlebars '{{\|}}' contained containedin=mustacheInside,@h syntax match mustacheUnescape '{{{\|}}}' contained containedin=mustacheInside,@htmlMustacheContainer syntax match mustacheConditionals '\([/#]\(if\|unless\)\|else\)' contained containedin=mustacheInside syntax match mustacheHelpers '[/#]\(with\|each\)' contained containedin=mustacheSection -syntax region mustacheComment start=/{{!/rs=s+2 end=/}}/re=e-2 contains=Todo contained containedin=mustacheInside,@htmlMustacheContainer -syntax region mustacheBlockComment start=/{{!--/rs=s+2 end=/--}}/re=e-2 contains=Todo contained containedin=mustacheInside,@htmlMustacheContainer +syntax region mustacheComment start=/{{!/rs=s+2 skip=/{{.\{-}}}/ end=/}}/re=e-2 contains=Todo contained containedin=mustacheInside,@htmlMustacheContainer +syntax region mustacheBlockComment start=/{{!--/rs=s+2 skip=/{{.\{-}}}/ end=/--}}/re=e-2 contains=Todo contained extend containedin=mustacheInside,@htmlMustacheContainer syntax region mustacheQString start=/'/ skip=/\\'/ end=/'/ contained containedin=mustacheInside syntax region mustacheDQString start=/"/ skip=/\\"/ end=/"/ contained containedin=mustacheInside diff --git a/syntax/rust.vim b/syntax/rust.vim index 25d3b4bf..0c7dcb8b 100644 --- a/syntax/rust.vim +++ b/syntax/rust.vim @@ -17,7 +17,7 @@ syn keyword rustConditional match if else syn keyword rustOperator as syn match rustAssert "\<assert\(\w\)*!" contained -syn match rustFail "\<fail\(\w\)*!" contained +syn match rustPanic "\<panic\(\w\)*!" contained syn keyword rustKeyword break syn keyword rustKeyword box nextgroup=rustBoxPlacement skipwhite skipempty syn keyword rustKeyword continue @@ -30,7 +30,7 @@ syn keyword rustKeyword unsafe virtual where while syn keyword rustKeyword use nextgroup=rustModPath skipwhite skipempty " FIXME: Scoped impl's name is also fallen in this category syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty -syn keyword rustStorage mut ref static const +syn keyword rustStorage move mut ref static const syn keyword rustInvalidBareKeyword crate @@ -66,70 +66,64 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self " This section is just straight transformation of the contents of the prelude, " to make it easy to update. -" Core operators {{{3 +" Reexported core operators {{{3 syn keyword rustTrait Copy Send Sized Sync syn keyword rustTrait Add Sub Mul Div Rem Neg Not syn keyword rustTrait BitAnd BitOr BitXor syn keyword rustTrait Drop Deref DerefMut -syn keyword rustTrait Shl Shr Index IndexMut -syn keyword rustEnum Option -syn keyword rustEnumVariant Some None -syn keyword rustEnum Result -syn keyword rustEnumVariant Ok Err +syn keyword rustTrait Shl Shr +syn keyword rustTrait Index IndexMut +syn keyword rustTrait Slice SliceMut +syn keyword rustTrait Fn FnMut FnOnce -" Functions {{{3 -"syn keyword rustFunction from_str -"syn keyword rustFunction range +" Reexported functions {{{3 +"syn keyword rustFunction range repeat "syn keyword rustFunction drop +"syn keyword rustFunction from_str -" Types and traits {{{3 +" Reexported types and traits {{{3 syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr syn keyword rustTrait IntoBytes syn keyword rustTrait ToCStr syn keyword rustTrait Char UnicodeChar syn keyword rustTrait Clone -syn keyword rustTrait PartialEq PartialOrd Eq Ord Equiv -syn keyword rustEnum Ordering +syn keyword rustTrait PartialEq PartialOrd Eq Ord +syn keyword rustEnum Ordering Equiv syn keyword rustEnumVariant Less Equal Greater -syn keyword rustTrait Collection Mutable Map MutableMap MutableSeq -syn keyword rustTrait Set MutableSet -syn keyword rustTrait FromIterator IntoIterator Extend ExactSize +syn keyword rustTrait FromIterator Extend ExactSize syn keyword rustTrait Iterator DoubleEndedIterator syn keyword rustTrait RandomAccessIterator CloneableIterator syn keyword rustTrait OrdIterator MutableDoubleEndedIterator -syn keyword rustTrait Num NumCast CheckedAdd CheckedSub CheckedMul CheckedDiv -syn keyword rustTrait Signed Unsigned Primitive Int Float -syn keyword rustTrait FloatMath ToPrimitive FromPrimitive +syn keyword rustTrait ToPrimitive FromPrimitive syn keyword rustTrait Box +syn keyword rustEnum Option +syn keyword rustEnumVariant Some None syn keyword rustTrait GenericPath Path PosixPath WindowsPath -syn keyword rustTrait RawPtr -syn keyword rustTrait Buffer Writer Reader Seek -syn keyword rustTrait Str StrVector StrSlice -syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrSlice -syn keyword rustTrait ToString IntoStr +syn keyword rustTrait RawPtr RawMutPtr +syn keyword rustEnum Result +syn keyword rustEnumVariant Ok Err +syn keyword rustTrait Buffer Writer Reader Seek BufferPrelude +syn keyword rustTrait Str StrVector StrPrelude +syn keyword rustTrait IntoMaybeOwned StrAllocating UnicodeStrPrelude syn keyword rustTrait Tuple1 Tuple2 Tuple3 Tuple4 syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8 syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12 -syn keyword rustTrait CloneableVector ImmutableCloneableVector -syn keyword rustTrait MutableCloneableSlice MutableOrdSlice -syn keyword rustTrait ImmutableSlice MutableSlice -syn keyword rustTrait ImmutablePartialEqSlice ImmutableOrdSlice -syn keyword rustTrait Slice VectorVector -syn keyword rustTrait MutableSliceAllocating -syn keyword rustTrait String +syn keyword rustTrait SlicePrelude AsSlice CloneSlicePrelude +syn keyword rustTrait VectorVector PartialEqSlicePrelude OrdSlicePrelude +syn keyword rustTrait CloneSliceAllocPrelude OrdSliceAllocPrelude SliceAllocPrelude +syn keyword rustTrait IntoString String ToString syn keyword rustTrait Vec +" Reexported runtime types {{{3 "syn keyword rustFunction sync_channel channel syn keyword rustTrait SyncSender Sender Receiver "syn keyword rustFunction spawn -"syn keyword rustConstant GC +" Other syntax {{{2 syn keyword rustSelf self syn keyword rustBoolean true false -" Other syntax {{{2 - " If foo::bar changes to foo.bar, change this ("::" to "\."). " If foo::bar changes to Foo::bar, change this (first "\w" to "\u"). syn match rustModPath "\w\(\w\)*::[^<]"he=e-3,me=e-3 @@ -151,8 +145,8 @@ syn match rustSigil display /[&~@*][^)= \t\r\n]/he=e-1,me=e-1 " Last, because the & in && isn't a sigil syn match rustOperator display "&&\|||" -syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustFail -syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustFail +syn match rustMacro '\w\(\w\)*!' contains=rustAssert,rustPanic +syn match rustMacro '#\w\(\w\)*' contains=rustAssert,rustPanic syn match rustEscapeError display contained /\\./ syn match rustEscape display contained /\\\([nrt0\\'"]\|x\x\{2}\)/ @@ -263,7 +257,7 @@ hi def link rustCommentLineDoc SpecialComment hi def link rustCommentBlock rustCommentLine hi def link rustCommentBlockDoc rustCommentLineDoc hi def link rustAssert PreCondit -hi def link rustFail PreCondit +hi def link rustPanic PreCondit hi def link rustMacro Macro hi def link rustType Type hi def link rustTodo Todo @@ -282,7 +276,7 @@ hi def link rustBoxPlacementExpr rustKeyword " hi rustAttribute ctermfg=cyan " hi rustDeriving ctermfg=cyan " hi rustAssert ctermfg=yellow -" hi rustFail ctermfg=red +" hi rustPanic ctermfg=red " hi rustMacro ctermfg=magenta syn sync minlines=200 diff --git a/syntax/typescript.vim b/syntax/typescript.vim index 6b1c6d65..9d48d480 100644 --- a/syntax/typescript.vim +++ b/syntax/typescript.vim @@ -116,7 +116,7 @@ syntax keyword typeScriptGlobalObjects Array Boolean Date Function Infinity Math syntax keyword typeScriptExceptions try catch throw finally Error EvalError RangeError ReferenceError SyntaxError TypeError URIError -syntax keyword typeScriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public +syntax keyword typeScriptReserved constructor declare as interface module abstract enum int short export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public type "}}} "" TypeScript/DOM/HTML/CSS specified things"{{{ @@ -250,7 +250,7 @@ if version >= 508 || !exists("did_typeScript_syn_inits") HiLink typeScriptIdentifier Identifier HiLink typeScriptRepeat Repeat HiLink typeScriptStatement Statement - HiLink typeScriptFuncKeyword Function + HiLink typeScriptFuncKeyword Type HiLink typeScriptMessage Keyword HiLink typeScriptDeprecated Exception HiLink typeScriptError Error |