Skip to content

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

syntax/gomod.vim

+7-4
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,22 @@ syntax keyword gomodGo go contained
1313
syntax keyword gomodRequire require
1414
syntax keyword gomodExclude exclude
1515
syntax keyword gomodReplace replace
16+
syntax keyword gomodRetract retract
1617

1718
" require, exclude, replace, and go can be also grouped into block
18-
syntax region gomodRequire start='require (' end=')' transparent contains=gomodRequire,gomodVersion
19-
syntax region gomodExclude start='exclude (' end=')' transparent contains=gomodExclude,gomodVersion
20-
syntax region gomodReplace start='replace (' end=')' transparent contains=gomodReplace,gomodVersion
21-
syntax match gomodGo '^go .*$' transparent contains=gomodGo,gomodGoVersion
19+
syntax region gomodRequire start='require (' end=')' transparent contains=gomodRequire,gomodVersion
20+
syntax region gomodExclude start='exclude (' end=')' transparent contains=gomodExclude,gomodVersion
21+
syntax region gomodReplace start='replace (' end=')' transparent contains=gomodReplace,gomodVersion
22+
syntax region gomodRetract start='retract \[' end='\]' transparent contains=gomodRetract,gomodVersion
23+
syntax match gomodGo '^go .*$' transparent contains=gomodGo,gomodGoVersion
2224

2325
" set highlights
2426
highlight default link gomodModule Keyword
2527
highlight default link gomodGo Keyword
2628
highlight default link gomodRequire Keyword
2729
highlight default link gomodExclude Keyword
2830
highlight default link gomodReplace Keyword
31+
highlight default link gomodRetract Keyword
2932

3033
" comments are always in form of // ...
3134
syntax region gomodComment start="//" end="$" contains=@Spell

0 commit comments

Comments
 (0)