@@ -109,8 +109,8 @@ GoDeferCleanup delcom GoFoldStruct
109109
110110" Two top-level clusters to allow regions to specify what syntax they can
111111" contain
112- syntax cluster goExpr contains =@goLiteral,goDotExpr,goFuncLiteral,goCommaExpr,goOperator,goWordStart,goParenBlock,goBracketBlock
113- syntax cluster goStatement contains =@goExpr,@goFlowControl,goReturn,goSemicolon,goBraceBlock,goComment, goStatementStart,goConstDecl,goVarDecl,goTypeDecl,goKeywords
112+ syntax cluster goExpr contains =@goLiteral,goDotExpr,goFuncLiteral,goCommaExpr,goOperator,goWordStart,goParenBlock,goBracketBlock,goComment
113+ syntax cluster goStatement contains =@goExpr,@goFlowControl,goReturn,goSemicolon,goBraceBlock,goStatementStart,goConstDecl,goVarDecl,goTypeDecl,goKeywords
114114
115115syntax match goIdentifier / \K\k */ contained nextgroup =goDotExpr skipwhite
116116
@@ -307,8 +307,8 @@ syntax keyword goVarDecl var skipwhite skipnl nextgroup=goVarIdentifier,goVa
307307" syntax region goVarDeclGroup matchgroup=goVarDeclParens start='(' end=')' contained contains=@goExpr,goComment,goSemicolon,goVarGroupIdentifier
308308" syntax region goConstDeclGroup matchgroup=goConstDeclParens start='(' end=')' contained contains=@goExpr,goComment,goSemicolon,goVarGroupIdentifier,goIota
309309
310- syntax region goVarDeclGroup matchgroup =goVarDeclParens start =' (' end =' )' contained contains =@goExpr,goComment, goSemicolon,goVarIdentifier
311- syntax region goConstDeclGroup matchgroup =goConstDeclParens start =' (' end =' )' contained contains =@goExpr,goComment, goSemicolon,goVarIdentifier,goIota
310+ syntax region goVarDeclGroup matchgroup =goVarDeclParens start =' (' end =' )' contained contains =@goExpr,goSemicolon,goVarIdentifier
311+ syntax region goConstDeclGroup matchgroup =goConstDeclParens start =' (' end =' )' contained contains =@goExpr,goSemicolon,goVarIdentifier,goIota
312312
313313" TODO: Is it worth supporting comments in goVarComma??
314314syntax match goVarIdentifier / \<\K\k */ contained skipwhite nextgroup =goVarComma,@goType
@@ -438,7 +438,7 @@ syntax match goSliceOrArrayLiteral /\k\@1<!\[[0-9.]*\]\ze\%(\*\|\K\|\[\|(\)/ con
438438syntax region goSliceLiteralType start =' \S ' end =' \z e{\| $' contained contains =goSliceLiteralTypeMatch skipwhite skipnl nextgroup =goSliceItems
439439syntax match goSliceLiteralTypeMatch / \% (\% (interface\| struct\)\s *{\| [^{]\)\+ / contained contains =@goType
440440
441- syntax region goSliceItems matchgroup =goSliceBraces start =' {' end =' }' contained contains =goStructLiteralBlock,@goExpr,goComment
441+ syntax region goSliceItems matchgroup =goSliceBraces start =' {' end =' }' contained contains =goStructLiteralBlock,@goExpr
442442
443443syntax match goChannel / <-chan/ contained contains =goChannelDir skipwhite nextgroup =@goType
444444syntax match goChannel / chan\% (<-\)\? / contained contains =goChannelDir skipwhite nextgroup =@goType
@@ -578,7 +578,7 @@ syntax region goStructLiteralTypeArgs matchgroup=goTypeParamBrackets start='\['
578578" goStructLiteralBlock contains itself to 1) prevent weird highlighting while
579579" typing, and 2) allow slice literals of slices of structs to highlight
580580" correctly
581- GoFoldStruct syntax region goStructLiteralBlock matchgroup= goStructBraces start = ' {' end = ' }' contained contains= goStructLiteralField,goComma,@g oExpr,goComment, goStructLiteralBlock
581+ GoFoldStruct syntax region goStructLiteralBlock matchgroup= goStructBraces start = ' {' end = ' }' contained contains= goStructLiteralField,goComma,@g oExpr,goStructLiteralBlock
582582
583583syntax match goStructLiteralField / \<\K\k *\z e:/ contained nextgroup =goStructLiteralColon
584584syntax match goStructLiteralColon / :/ contained
0 commit comments