summaryrefslogtreecommitdiffstats
path: root/syntax/basic/keyword.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/basic/keyword.vim')
-rw-r--r--syntax/basic/keyword.vim16
1 files changed, 13 insertions, 3 deletions
diff --git a/syntax/basic/keyword.vim b/syntax/basic/keyword.vim
index 611a3f91..adcd950b 100644
--- a/syntax/basic/keyword.vim
+++ b/syntax/basic/keyword.vim
@@ -5,7 +5,7 @@ endif
"Import
syntax keyword typescriptImport from as
syntax keyword typescriptImport import
- \ nextgroup=typescriptImportType
+ \ nextgroup=typescriptImportType,typescriptTypeBlock,typescriptDefaultImportName
\ skipwhite
syntax keyword typescriptImportType type
\ contained
@@ -17,11 +17,10 @@ syntax match typescriptExportType /\<type\s*{\@=/
syntax keyword typescriptModule namespace module
-syntax keyword typescriptCastKeyword as
+syntax keyword typescriptCastKeyword as satisfies
\ nextgroup=@typescriptType
\ skipwhite
-
syntax keyword typescriptVariable let var
\ nextgroup=@typescriptVariableDeclarations
\ skipwhite skipempty
@@ -90,6 +89,17 @@ syntax cluster typescriptAmbients contains=
\ typescriptModule
syntax keyword typescriptIdentifier arguments nextgroup=@afterIdentifier
+syntax match typescriptDefaultImportName /\v\h\k*( |,)/
+ \ contained
+ \ nextgroup=typescriptTypeBlock
+ \ skipwhite skipempty
+
+syntax region typescriptTypeBlock
+ \ matchgroup=typescriptBraces
+ \ start=/{/ end=/}/
+ \ contained
+ \ contains=typescriptIdentifierName,typescriptImportType
+ \ fold
"Program Keywords
exec 'syntax keyword typescriptNull null '.(exists('g:typescript_conceal_null') ? 'conceal cchar='.g:typescript_conceal_null : '').' nextgroup=@typescriptSymbols skipwhite skipempty'