From f95026252c5a31242903a98c741887696dfbb11f Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 27 Sep 2019 19:47:32 +0200 Subject: Update everything, closes #435 --- syntax/gomod.vim | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'syntax/gomod.vim') diff --git a/syntax/gomod.vim b/syntax/gomod.vim index 1d70e539..11cd7686 100644 --- a/syntax/gomod.vim +++ b/syntax/gomod.vim @@ -11,17 +11,20 @@ syntax case match " match keywords syntax keyword gomodModule module +syntax keyword gomodGo go contained syntax keyword gomodRequire require syntax keyword gomodExclude exclude syntax keyword gomodReplace replace -" require, exclude and replace can be also grouped into block +" require, exclude, replace, and go can be also grouped into block syntax region gomodRequire start='require (' end=')' transparent contains=gomodRequire,gomodVersion syntax region gomodExclude start='exclude (' end=')' transparent contains=gomodExclude,gomodVersion syntax region gomodReplace start='replace (' end=')' transparent contains=gomodReplace,gomodVersion +syntax match gomodGo '^go .*$' transparent contains=gomodGo,gomodGoVersion " set highlights highlight default link gomodModule Keyword +highlight default link gomodGo Keyword highlight default link gomodRequire Keyword highlight default link gomodExclude Keyword highlight default link gomodReplace Keyword @@ -38,6 +41,10 @@ highlight default link gomodString String syntax match gomodReplaceOperator "\v\=\>" highlight default link gomodReplaceOperator Operator +" match go versions +syntax match gomodGoVersion "1\.\d\+" contained +highlight default link gomodGoVersion Identifier + " highlight versions: " * vX.Y.Z-pre -- cgit v1.2.3