diff options
author | Billie Cleek <bhcleek@users.noreply.github.com> | 2024-01-22 11:08:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 20:08:44 +0100 |
commit | ea9a93e5b0989b9242a1ea1f6f2dd7c9399e6f20 (patch) | |
tree | a229591706edde04adf742bb51c87537fb310f8a /runtime | |
parent | 1cee50904e69eb8d512f2c4eb1951e73108ad826 (diff) |
runtime(go): update Go syntax file (#13896)
Update the Go syntax file with some recent changes made to vim-go.
Signed-off-by: Billie Cleek <bhcleek@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/syntax/go.vim | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/runtime/syntax/go.vim b/runtime/syntax/go.vim index 4272e807f3..ba776f949c 100644 --- a/runtime/syntax/go.vim +++ b/runtime/syntax/go.vim @@ -5,7 +5,7 @@ " go.vim: Vim syntax file for Go. " Language: Go " Maintainer: Billie Cleek <bhcleek@gmail.com> -" Latest Revision: 2023-08-21 +" Latest Revision: 2024-01-21 " License: BSD-style. See LICENSE file in source repository. " Repository: https://github.com/fatih/vim-go @@ -230,21 +230,31 @@ endif " import if s:FoldEnable('import') syn region goImport start='import (' end=')' transparent fold contains=goImport,goImportString,goComment + syn match goImport /^import ()/ transparent fold contains=goImport else syn region goImport start='import (' end=')' transparent contains=goImport,goImportString,goComment + syn match goImport /^import ()/ transparent contains=goImport endif " var, const if s:FoldEnable('varconst') syn region goVar start='var (' end='^\s*)$' transparent fold - \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator + \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator + syn match goVar /var ()/ transparent fold + \ contains=goVar syn region goConst start='const (' end='^\s*)$' transparent fold - \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator + \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator + syn match goConst /const ()/ transparent fold + \ contains=goConst else syn region goVar start='var (' end='^\s*)$' transparent - \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator + \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator + syn match goVar /var ()/ transparent + \ contains=goVar syn region goConst start='const (' end='^\s*)$' transparent - \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator + \ contains=ALLBUT,goParen,goBlock,goFunction,goTypeName,goReceiverType,goReceiverVar,goParamName,goParamType,goSimpleParams,goPointerOperator + syn match goConst /const ()/ transparent + \ contains=goConst endif " Single-line var, const, and import. |