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

go_highlight_types for interface #1283

Closed
fuweid opened this issue May 11, 2017 · 3 comments
Closed

go_highlight_types for interface #1283

fuweid opened this issue May 11, 2017 · 3 comments

Comments

@fuweid
Copy link

fuweid commented May 11, 2017

Behavior

Hi,

I set let g:go_highlight_types = 1 and have highlight issue here. Please check the following picture. I think interfaceEncoder should not be highlighted. Does it make senses from original design?

The reference code is here.

screen shot 2017-05-11 at 10 42 55

Steps to reproduce:

Re produce it with a minimal vimrc with all plugins disabled and
only vim-go enabled:

let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_types = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1

Configuration

Add here your current configuration and additional information that might be
useful, such as:

  • vim version: VIM - Vi IMproved 8.0
  • vim-go version: v1.12
  • go version: go version go1.8 darwin/amd64
@zkry
Copy link
Contributor

zkry commented May 25, 2017

The error is caused by the syntax check of the keywords interface and struct.
syn match goDeclType /<interface|struct>/ skipwhite skipnl

Interestingly enough, this also causes the "struct" keyword to be highlighted when it is at the end of a word, like in encoderstruct. I made a pull request to fix this.

@fuweid
Copy link
Author

fuweid commented May 26, 2017

@zkry Thank you!
@fatih does it make senses?

fatih added a commit that referenced this issue May 27, 2017
Fix Issue #1283 Resolve highlighting error by surrounding expression in \(\)
@fatih
Copy link
Owner

fatih commented May 27, 2017

This is fixed now with #1301 thanks to @zkry. Please pull latest master and thanks for the feedback.

@fatih fatih closed this as completed May 27, 2017
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

No branches or pull requests

3 participants