diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-27 12:05:29 +0200 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-09-27 12:05:29 +0200 | 
| commit | 7ec499c19f91122724d1518887ba3ffe4a8fcb43 (patch) | |
| tree | 090623fa904e05eabcffafd987cc3055b9080423 /syntax/basic | |
| parent | 33b86476b63f7fc2286336eb488a149a85cb08cb (diff) | |
| download | vim-polyglot-7ec499c19f91122724d1518887ba3ffe4a8fcb43.tar.gz vim-polyglot-7ec499c19f91122724d1518887ba3ffe4a8fcb43.zip | |
Set indentation only locally, fixes #564v4.12.1
Diffstat (limited to 'syntax/basic')
| -rw-r--r-- | syntax/basic/type.vim | 16 | 
1 files changed, 15 insertions, 1 deletions
| diff --git a/syntax/basic/type.vim b/syntax/basic/type.vim index 616c3271..02e78237 100644 --- a/syntax/basic/type.vim +++ b/syntax/basic/type.vim @@ -56,6 +56,7 @@ syntax cluster typescriptPrimaryType contains=    \ typescriptTupleType,    \ typescriptTypeQuery,    \ typescriptStringLiteralType, +  \ typescriptTemplateLiteralType,    \ typescriptReadonlyArrayKeyword,    \ typescriptAssertType @@ -64,6 +65,17 @@ syntax region  typescriptStringLiteralType contained    \ nextgroup=typescriptUnion    \ skipwhite skipempty +syntax region  typescriptTemplateLiteralType contained +  \ start=/`/  skip=/\\\\\|\\`\|\n/  end=/`\|$/ +  \ contains=typescriptTemplateSubstitutionType +  \ nextgroup=typescriptTypeOperator +  \ skipwhite skipempty + +syntax region  typescriptTemplateSubstitutionType matchgroup=typescriptTemplateSB +  \ start=/\${/ end=/}/ +  \ contains=@typescriptType +  \ contained +  syntax region typescriptParenthesizedType matchgroup=typescriptParens    \ start=/(/ end=/)/    \ contains=@typescriptType @@ -103,10 +115,12 @@ syntax region typescriptTupleType matchgroup=typescriptBraces    \ contained skipwhite  syntax cluster typescriptTypeOperator -  \ contains=typescriptUnion,typescriptTypeBracket +  \ contains=typescriptUnion,typescriptTypeBracket,typescriptConstraint,typescriptConditionalType  syntax match typescriptUnion /|\|&/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty +syntax match typescriptConditionalType /?\|:/ contained nextgroup=@typescriptPrimaryType skipwhite skipempty +  syntax cluster typescriptFunctionType contains=typescriptGenericFunc,typescriptFuncType  syntax region typescriptGenericFunc matchgroup=typescriptTypeBrackets    \ start=/</ end=/>/ | 
