Skip to content

fix go work syntax having wrong highlighting entirely #819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions syntax/gowork.vim
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@ syntax case match

" match keywords
syntax keyword goworkGo go contained
syntax keyword goworkUse use
syntax keyword goworkExclude exclude
syntax keyword goworkUse use
syntax keyword goworkReplace replace
syntax keyword goworkRetract retract

" require, exclude, replace, and go can be also grouped into block
syntax region goworkUse start='require (' end=')' transparent contains=goworkUse,goworkPath
" use, exclude, replace, and go can be also grouped into block
syntax region goworkUse start='use (' end=')' transparent contains=goworkUse
syntax region goworkReplace start='replace (' end=')' transparent contains=goworkReplace,goworkVersion
syntax match goworkGo '^go .*$' transparent contains=goworkGo,goworkGoVersion

Expand All @@ -47,11 +45,6 @@ highlight default link goworkReplaceOperator Operator
syntax match goworkGoVersion "1\.\d\+" contained
highlight default link goworkGoVersion Identifier


" match paths in use directives
syntax match goworkPath "\f\+"

highlight default link goworkPath Identifier
" highlight versions:
" * vX.Y.Z-pre
" * vX.Y.Z
Expand Down