Browse Source

Maybe I don't understand keepend... ?

Andrew Swistak 8 năm trước cách đây
mục cha
commit
49cacdf849
1 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 4 4
      after/syntax/go.vim

+ 4 - 4
after/syntax/go.vim

@@ -28,8 +28,8 @@ if g:go_highlight_types != 0
 
   syn match goTypeDecl                   /\<type\>/ nextgroup=goNewDeclType,goTypeRegion skipwhite skipnl
   syn region goTypeRegion                matchgroup=goContainer start=/(/ end=/)/ contains=@validTypeContains fold contained
-  syn region goDeclStructRegion          matchgroup=goContainer start=/{/ end=/}/ contains=@validStructContains fold keepend contained
-  syn region goDeclInterfaceRegion       matchgroup=goContainer start=/{/ end=/}/ contains=@validInterfaceContains fold keepend contained
+  syn region goDeclStructRegion          matchgroup=goContainer start=/{/ end=/}/ contains=@validStructContains fold contained
+  syn region goDeclInterfaceRegion       matchgroup=goContainer start=/{/ end=/}/ contains=@validInterfaceContains fold contained
 
   " Match \w+\.\w+ but only highlight lone \w+ or (?>\.)\w+
   syn match goDeclTypeW                  /\%(\w\+\.\)\?\w\+\(\[.*\]\S\+\)\?/ contains=goDeclTypeNS,goDeclTypeType,goDeclTypeMap,ContainerChars,OperatorChars,goDeclaration skipwhite contained
@@ -58,9 +58,9 @@ if g:go_highlight_functions != 0
   syn match goFunctionCall          /\(\.\)\@1<!\w\+\((\)\@1=/
 
   "TODO: add goDeclTypeW
-  syn cluster validFuncRegionContains contains=@goTypes,goField,goDeclaration,GoBuiltins,goDeclStruct,goDeclInterface,OperatorChars,ContainerChars,goString,goRawString,@goNumber,goTypeConstructor,goMethodCall
+  syn cluster validFuncRegionContains contains=@goTypes,goField,goDeclaration,goBuiltins,goDeclStruct,goDeclInterface,OperatorChars,ContainerChars,goString,goRawString,@goNumber,goTypeConstructor,goMethodCall
 
-  syn match goFunctionTagLine       /\w\+(.*)\(\s*(.*)\|\s\S\+\)\?/ nextgroup=goFunction contains=goFunction,goFunctionParamRegion,goFunctionReturnRegion,goFunctionReturn,OperatorChars,ContainerChars,goComment
+  syn match goFunctionTagLine       /\w\+(.*)\(\s*(.*)\|\s\+\S\+\)\?/ nextgroup=goFunction contains=goFunction,goFunctionParamRegion,goFunctionReturnRegion,goFunctionReturn,OperatorChars,ContainerChars,goComment
   syn region goFunctionParamRegion  matchgroup=goContainer start=/(/ end=/)/ contains=@validFuncRegionContains nextgroup=goFunctionReturnRegion,goFunctionReturn skipwhite keepend contained
   syn region goFunctionReturnRegion matchgroup=goContainer start=/(/ end=/)/ contains=@validFuncRegionContains skipwhite keepend contained
   syn match goFunctionReturn        /\w\+/ contains=@validFuncRegionContains skipwhite contained