diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2020-01-25 16:56:10 +0100 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-01-25 16:56:10 +0100 | 
| commit | 35ea4d2b9072594b6c0ccf87bde7978ed9f94755 (patch) | |
| tree | e829bad239fea3150cd0963933f3e33214f069b4 /syntax | |
| parent | 967486dd716de860db3ef091a9dcb9cb65023534 (diff) | |
| download | vim-polyglot-35ea4d2b9072594b6c0ccf87bde7978ed9f94755.tar.gz vim-polyglot-35ea4d2b9072594b6c0ccf87bde7978ed9f94755.zip | |
Updatev4.2.1
Diffstat (limited to '')
| -rw-r--r-- | syntax/basic/decorator.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/function.vim | 2 | ||||
| -rw-r--r-- | syntax/basic/keyword.vim | 11 | ||||
| -rw-r--r-- | syntax/basic/members.vim | 2 | ||||
| -rw-r--r-- | syntax/common.vim | 4 | ||||
| -rw-r--r-- | syntax/go.vim | 18 | ||||
| -rw-r--r-- | syntax/helm.vim | 8 | ||||
| -rw-r--r-- | syntax/javascript.vim | 2 | ||||
| -rw-r--r-- | syntax/zig.vim | 8 | 
9 files changed, 44 insertions, 13 deletions
| diff --git a/syntax/basic/decorator.vim b/syntax/basic/decorator.vim index 1a8fc2c7..2a7a1dd1 100644 --- a/syntax/basic/decorator.vim +++ b/syntax/basic/decorator.vim @@ -1,7 +1,7 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  syntax match typescriptDecorator /@\([_$a-zA-Z][_$a-zA-Z0-9]*\.\)*[_$a-zA-Z][_$a-zA-Z0-9]*\>/ -  \ nextgroup=typescriptArgumentList,typescriptTypeArguments +  \ nextgroup=typescriptFuncCallArg,typescriptTypeArguments    \ contains=@_semantic,typescriptDotNotation  endif diff --git a/syntax/basic/function.vim b/syntax/basic/function.vim index ac1c4a4c..5acbb55c 100644 --- a/syntax/basic/function.vim +++ b/syntax/basic/function.vim @@ -40,7 +40,7 @@ syntax match   typescriptArrowFuncDef          contained /\K\k*\s*=>/    \ skipwhite skipempty  " TODO: optimize this pattern -syntax region   typescriptArrowFuncDef          contained start=/(\_[^)]*):/ end=/=>/ +syntax region   typescriptArrowFuncDef          contained start=/(\_[^(^)]*):/ end=/=>/    \ contains=typescriptArrowFuncArg,typescriptArrowFunc,typescriptTypeAnnotation    \ nextgroup=@typescriptExpression,typescriptBlock    \ skipwhite skipempty keepend diff --git a/syntax/basic/keyword.vim b/syntax/basic/keyword.vim index ff1e169a..11639c43 100644 --- a/syntax/basic/keyword.vim +++ b/syntax/basic/keyword.vim @@ -1,8 +1,17 @@  if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1  "Import -syntax keyword typescriptImport                from as import +syntax keyword typescriptImport                from as +syntax keyword typescriptImport                import +  \ nextgroup=typescriptImportType +  \ skipwhite +syntax keyword typescriptImportType            type +  \ contained  syntax keyword typescriptExport                export +  \ nextgroup=typescriptExportType +  \ skipwhite +syntax match typescriptExportType              /\<type\s*{\@=/ +  \ contained skipwhite skipempty skipnl  syntax keyword typescriptModule                namespace module  "this diff --git a/syntax/basic/members.vim b/syntax/basic/members.vim index 267bd110..343559b9 100644 --- a/syntax/basic/members.vim +++ b/syntax/basic/members.vim @@ -7,7 +7,7 @@ syntax keyword typescriptConstructor           contained constructor  syntax cluster memberNextGroup contains=typescriptMemberOptionality,typescriptTypeAnnotation,@typescriptCallSignature -syntax match typescriptMember /\K\k*/ +syntax match typescriptMember /#\?\K\k*/    \ nextgroup=@memberNextGroup    \ contained skipwhite diff --git a/syntax/common.vim b/syntax/common.vim index c7a755cc..fed39cf6 100644 --- a/syntax/common.vim +++ b/syntax/common.vim @@ -13,6 +13,8 @@ if main_syntax == 'typescript' || main_syntax == 'typescriptreact'    setlocal iskeyword+=$    " syntax cluster htmlJavaScript                 contains=TOP  endif +" For private field added from TypeScript 3.8 +setlocal iskeyword+=#  " lowest priority on least used feature  syntax match   typescriptLabel                /[a-zA-Z_$]\k*:/he=e-1 contains=typescriptReserved nextgroup=@typescriptStatement skipwhite skipempty @@ -101,8 +103,10 @@ if exists("did_typescript_hilink")    HiLink typescriptLabel                Label    HiLink typescriptStringProperty       String    HiLink typescriptImport               Special +  HiLink typescriptImportType           Special    HiLink typescriptAmbientDeclaration   Special    HiLink typescriptExport               Special +  HiLink typescriptExportType           Special    HiLink typescriptModule               Special    HiLink typescriptTry                  Special    HiLink typescriptExceptions           Special diff --git a/syntax/go.vim b/syntax/go.vim index 38a4993c..fef0e689 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -395,6 +395,24 @@ function! s:hi()    hi def link goDiagnosticError SpellBad    hi def link goDiagnosticWarning SpellRare +  " TODO(bc): is it appropriate to define text properties in a syntax file? +  " The highlight groups need to be defined before the text properties types +  " are added, and when users have syntax enabled in their vimrc after +  " filetype plugin on, the highlight groups won't be defined when +  " ftplugin/go.vim is executed when the first go file is opened. +  " See https://github.com/fatih/vim-go/issues/2658. +  if exists('*prop_type_add') +    if empty(prop_type_get('goSameId')) +      call prop_type_add('goSameId', {'highlight': 'goSameId'}) +    endif +    if empty(prop_type_get('goDiagnosticError')) +      call prop_type_add('goDiagnosticError', {'highlight': 'goDiagnosticError'}) +    endif +    if empty(prop_type_get('goDiagnosticWarning')) +      call prop_type_add('goDiagnosticWarning', {'highlight': 'goDiagnosticWarning'}) +    endif +  endif +    hi def link goDeclsFzfKeyword        Keyword    hi def link goDeclsFzfFunction       Function    hi def link goDeclsFzfSpecialComment SpecialComment diff --git a/syntax/helm.vim b/syntax/helm.vim index 9e8be342..8118a573 100644 --- a/syntax/helm.vim +++ b/syntax/helm.vim @@ -81,10 +81,10 @@ hi def link     gotplFunctions      Function  hi def link     goSprigFunctions    Function  hi def link     goTplVariable       Special -syn region gotplAction start="{{" end="}}" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable,goTplIdentifier containedin=yamlFlowString display -syn region gotplAction start="\[\[" end="\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable containedin=yamlFlowString display -syn region goTplComment start="{{\(- \)\?/\*" end="\*/\( -\)\?}}" display -syn region goTplComment start="\[\[\(- \)\?/\*" end="\*/\( -\)\?\]\]" display +syn region gotplAction start="{{\(-? \)\?" end="\( -?\)\?}}" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable,goTplIdentifier containedin=yamlFlowString display +syn region gotplAction start="\[\[\(-? \)\?" end="\( -?\)\?\]\]" contains=@gotplLiteral,gotplControl,gotplFunctions,goSprigFunctions,gotplVariable containedin=yamlFlowString display +syn region goTplComment start="{{\(-? \)\?/\*" end="\*/\( -?\)\?}}" display +syn region goTplComment start="\[\[\(-? \)\?/\*" end="\*/\( -?\)\?\]\]" display  hi def link gotplAction PreProc  hi def link goTplComment Comment diff --git a/syntax/javascript.vim b/syntax/javascript.vim index 29863ee1..0ffc5aa1 100644 --- a/syntax/javascript.vim +++ b/syntax/javascript.vim @@ -201,7 +201,7 @@ syntax match   jsDestructuringNoise             contained /[,[\]]/  syntax region  jsDestructuringPropertyComputed  contained matchgroup=jsDestructuringBraces start=/\[/ end=/]/ contains=@jsExpression skipwhite skipempty nextgroup=jsDestructuringValue,jsDestructuringValueAssignment,jsDestructuringNoise extend fold  " Comments -syntax keyword jsCommentTodo    contained TODO FIXME XXX TBD +syntax keyword jsCommentTodo    contained TODO FIXME XXX TBD NOTE  syntax region  jsComment        start=+//+ end=/$/ contains=jsCommentTodo,@Spell extend keepend  syntax region  jsComment        start=+/\*+  end=+\*/+ contains=jsCommentTodo,@Spell fold extend keepend  syntax region  jsEnvComment     start=/\%^#!/ end=/$/ display diff --git a/syntax/zig.vim b/syntax/zig.vim index 3b559f49..bdb9ac27 100644 --- a/syntax/zig.vim +++ b/syntax/zig.vim @@ -10,7 +10,7 @@ if exists("b:current_syntax")  endif  let b:current_syntax = "zig" -syn keyword zigStorage const var extern packed export pub noalias inline noinline comptime nakedcc stdcallcc volatile allowzero align linksection threadlocal +syn keyword zigStorage const var extern packed export pub noalias inline noinline comptime callconv volatile allowzero align linksection threadlocal  syn keyword zigStructure struct enum union error  syn keyword zigStatement break return continue asm defer errdefer unreachable try catch async noasync await suspend resume  syn keyword zigConditional if else switch and or orelse @@ -29,7 +29,7 @@ syn match zigType "\v<[iu][1-9]\d*>"  syn match zigOperator display "\%(+%\?\|-%\?\|/\|*%\?\|=\|\^\|&\|?\||\|!\|>\|<\|%\|<<%\?\|>>\)=\?"  syn match zigArrowCharacter display "->" -syn match zigBuiltinFn "\v\@(addWithOverflow|ArgType|atomicLoad|bitCast|breakpoint)>" +syn match zigBuiltinFn "\v\@(addWithOverflow|ArgType|atomicLoad|atomicStore|bitCast|breakpoint)>"  syn match zigBuiltinFn "\v\@(alignCast|alignOf|cDefine|cImport|cInclude)>"  syn match zigBuiltinFn "\v\@(cUndef|canImplicitCast|clz|cmpxchgWeak|cmpxchgStrong|compileError)>"  syn match zigBuiltinFn "\v\@(compileLog|ctz|popCount|divExact|divFloor|divTrunc)>" @@ -42,10 +42,10 @@ syn match zigBuiltinFn "\v\@(bitOffsetOf|byteOffsetOf|OpaqueType|panic|ptrCast)>  syn match zigBuiltinFn "\v\@(ptrToInt|rem|returnAddress|setCold|Type|shuffle)>"  syn match zigBuiltinFn "\v\@(setRuntimeSafety|setEvalBranchQuota|setFloatMode)>"  syn match zigBuiltinFn "\v\@(setGlobalLinkage|setGlobalSection|shlExact|This|hasDecl|hasField)>" -syn match zigBuiltinFn "\v\@(shlWithOverflow|shrExact|sizeOf|sqrt|byteSwap|subWithOverflow|intCast|floatCast|intToFloat|floatToInt|boolToInt|errSetCast)>" +syn match zigBuiltinFn "\v\@(shlWithOverflow|shrExact|sizeOf|bitSizeOf|sqrt|byteSwap|subWithOverflow|intCast|floatCast|intToFloat|floatToInt|boolToInt|errSetCast)>"  syn match zigBuiltinFn "\v\@(truncate|typeId|typeInfo|typeName|TypeOf|atomicRmw|bytesToSlice|sliceToBytes)>"  syn match zigBuiltinFn "\v\@(intToError|errorToInt|intToEnum|enumToInt|setAlignStack|frame|Frame|frameSize|bitReverse|Vector)>" -syn match zigBuiltinFn "\v\@(sin|cos|exp|exp2|ln|log2|log10|fabs|floor|ceil|trunc|round)>" +syn match zigBuiltinFn "\v\@(sin|cos|exp|exp2|log|log2|log10|fabs|floor|ceil|trunc|round)>"  syn match zigDecNumber display "\<[0-9]\+\%(.[0-9]\+\)\=\%([eE][+-]\?[0-9]\+\)\="  syn match zigHexNumber display "\<0x[a-fA-F0-9]\+\%([a-fA-F0-9]\+\%([pP][+-]\?[0-9]\+\)\?\)\=" | 
