We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4670d4f commit 583a494Copy full SHA for 583a494
1 file changed
extras/flow.vim
@@ -1,6 +1,6 @@
1
syntax region jsFlowTypeStatement start=/type/ end=/=/ oneline skipwhite skipempty nextgroup=jsFlowTypeObject
2
syntax region jsFlowDeclareBlock start=/declare/ end=/[;\n]/ oneline contains=jsFlow,jsFlowDeclareKeyword,jsFlowStorageClass
3
-syntax region jsFlow start=/:/ end=/\%(\%([),=;\n]\|{\%(.*}\)\@!\|\%({.*}\)\@<=\s*{\)\@=\|void\)/ contains=@jsFlowCluster oneline skipwhite skipempty nextgroup=jsFuncBlock
+syntax region jsFlow start=/:/ end=/\%(\%([),=;\n]\|{\%(.*}\)\@!\|\%({.*}\)\@<=\s*{\)\@=\|void\)/ contains=@jsFlowCluster containedin=jsBlock,jsClassBlock,jsFuncBlock,jsBlock,jsTryCatchBlock,jsSwitchBlock,jsParen oneline skipwhite skipempty nextgroup=jsFuncBlock
4
syntax region jsFlowReturn contained start=/:/ end=/\%(\S\s*\%({\%(.*}\)\@!\)\@=\|\n\)/ contains=@jsFlowCluster oneline skipwhite skipempty nextgroup=jsFuncBlock keepend
5
syntax region jsFlowTypeObject contained matchgroup=jsFlowNoise start=/{/ end=/}/ contains=jsFlowTypeKey,jsFlowNoise skipwhite skipempty nextgroup=jsFunctionBlock extend
6
syntax match jsFlowTypeKey contained /\<[0-9a-zA-Z_$?]*\>\(\s*:\)\@=/ skipwhite skipempty nextgroup=jsFlowTypeValue
0 commit comments