diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-03-29 20:30:36 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-03-29 20:30:36 +0100 |
commit | a55b6aa3aa797c989a4979a13a5bd2ae11cfd4a5 (patch) | |
tree | 0ec7670cabfdf1b5fa3545cee9ee9d6ca7c8ad32 /syntax/gomod.vim | |
parent | 1d45a6d4f094127b113470d7710695b280224933 (diff) | |
download | vim-polyglot-3.7.1.tar.gz vim-polyglot-3.7.1.zip |
Remove grapqhl, fixes #387v3.7.1
Diffstat (limited to 'syntax/gomod.vim')
-rw-r--r-- | syntax/gomod.vim | 49 |
1 files changed, 36 insertions, 13 deletions
diff --git a/syntax/gomod.vim b/syntax/gomod.vim index 6ec4838a..74b430cc 100644 --- a/syntax/gomod.vim +++ b/syntax/gomod.vim @@ -42,25 +42,48 @@ highlight default link gomodReplaceOperator Operator " highlight versions: +" * vX.Y.Z-pre " * vX.Y.Z " * vX.0.0-yyyyymmddhhmmss-abcdefabcdef " * vX.Y.Z-pre.0.yyyymmddhhmmss-abcdefabcdef " * vX.Y.(Z+1)-0.yyyymmddhhss-abcdefabcdef -" * +incompatible suffix when X > 1 +" see https://godoc.org/golang.org/x/tools/internal/semver for more +" information about how semantic versions are parsed and +" https://golang.org/cmd/go/ for how pseudo-versions and +incompatible +" are applied. + + " match vX.Y.Z and their prereleases -syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(-\%(\w\+\.\)\+0\.\d\{14}-\x\+\)\?" -" match target when most recent version before the target is X.Y.Z -syntax match gomodVersion "v\d\+\.\d\+\.[1-9]\{1}\d*\%(-0\.\%(\d\{14}-\x\+\)\)\?" -" match target without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) -syntax match gomodVersion "v\d\+\.0\.0-\d\{14\}-\x\+" - -" match vX.Y.Z and their prereleases for X>1 -syntax match gomodVersion "v[2-9]\{1}\d\?\.\d\+\.\d\+\%(-\%(\w\+\.\)\+0\.\d\{14\}-\x\+\)\?\%(+incompatible\>\)\?" -" match target when most recent version before the target is X.Y.Z for X>1 -syntax match gomodVersion "v[2-9]\{1}\d\?\.\d\+\.[1-9]\{1}\d*\%(-0\.\%(\d\{14\}-\x\+\)\)\?\%(+incompatible\>\)\?" -" match target without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) for X>1 -syntax match gomodVersion "v[2-9]\{1}\d\?\.0\.0-\d\{14\}-\x\+\%(+incompatible\>\)\?" +syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?" +" ^--- version ---^^------------ pre-release ---------------------^^--------------- metadata ---------------------^ +" ^--------------------------------------- semantic version -------------------------------------------------------^ + +" match pseudo versions +" without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) +syntax match gomodVersion "v\d\+\.0\.0-\d\{14\}-\x\+" +" when most recent version before target is a pre-release +syntax match gomodVersion "v\d\+\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\+" +" ^--- version ---^^--- ------ pre-release -----------------^^--------------- metadata ---------------------^ +" ^------------------------------------- semantic version --------------------------------------------------^ +" most recent version before the target is X.Y.Z +syntax match gomodVersion "v\d\+\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\+" +" ^--- version ---^^--------------- metadata ---------------------^ + +" match incompatible vX.Y.Z and their prereleases +syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?+incompatible" +" ^------- version -------^^------------- pre-release ---------------------^^--------------- metadata ---------------------^ +" ^------------------------------------------- semantic version -----------------------------------------------------------^ +" match incompatible pseudo versions +" incompatible without a major version before the commit (e.g. vX.0.0-yyyymmddhhmmss-abcdefabcdef) +syntax match gomodVersion "v[2-9]\{1}\d*\.0\.0-\d\{14\}-\x\++incompatible" +" when most recent version before target is a pre-release +syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+-\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\%(+\%([0-9A-Za-z-]\+\)\(\.[0-9A-Za-z-]\+\)*\)\?\.0\.\d\{14}-\x\++incompatible" +" ^------- version -------^^---------- pre-release -----------------^^--------------- metadata ---------------------^ +" ^---------------------------------------- semantic version ------------------------------------------------------^ +" most recent version before the target is X.Y.Z +syntax match gomodVersion "v[2-9]\{1}\d*\.\d\+\.\d\+\%(+\%([0-9A-Za-z-]\+\)\%(\.[0-9A-Za-z-]\+\)*\)\?-0\.\d\{14}-\x\++incompatible" +" ^------- version -------^^---------------- metadata ---------------------^ highlight default link gomodVersion Identifier let b:current_syntax = "gomod" |