Skip to content
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

Add syntax for 'retract' directive in go.mod #3166

Merged
merged 1 commit into from
Mar 10, 2021

Conversation

dolmen
Copy link
Contributor

@dolmen dolmen commented Mar 8, 2021

Retract directive is new with Go 1.16.
https://golang.org/ref/mod#go-mod-file-retract

I'm not an expert at Vim syntax, so please review carefully.

Cc: @carnott-snap @bhcleek @rhysd

@dolmen
Copy link
Contributor Author

dolmen commented Mar 8, 2021

#3162 exists, but my implementation supports the block syntax.

syntax match gomodVersionRangeBracket "\[" contained
syntax match gomodVersionRangeBracket "\]" contained
highlight default link gomodVersionRangeBracket Operator
syntax match gomodVersionRangeSeparator "," contained
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be consistent with source, we probably should not highlight the ,s

syntax match gomodVersionRangeSeparator "," contained
highlight default link gomodVersionRangeSeparator Operator


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra new line?

Suggested change

Copy link
Contributor

@carnott-snap carnott-snap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does what it says on the tin; tested with client-go@v1.5.2

@bhcleek bhcleek added this to the vim-go 1.25 milestone Mar 8, 2021
Copy link
Collaborator

@bhcleek bhcleek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Thank you.

@carnott-snap is right on the comment regarding the comma and extra newline. Feel free to change those if you want before I merge this. Otherwise, I'll merge it soon and make the changes myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants