-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Vim syntax match for variable definitions #1426
Conversation
This adds a match for variable definitions, such as: foo := ... foo, bar := ...
Match for variable definition highlighting
Two comments:
|
Hmm that is strange, it works for multiple variable for me (that's the EDIT: hm, I've double checked and tested, but it works fine for both |
Just tested again; it really doesn't work for me in Vim 8.0.987 with the current vim-go master, even in my "minimal" setup without vimrc and just the vim-go plugin. It looks like the problem is you forgot to add a
I don't know why it works for you... Also, to avoid highlighting spaces between the last variable and
And with
|
Ah I see you are well versed in Vim regexes. I've changed it. |
@Carpetsmoker I've added you to the repo. From now on please feel free to merge & review syntax based PR's as I think you're the best fit. Just don't forgot to update the Changelog. |
Thanks @fatih 👍 |
- Highlight `goVarDefs` so that enabling `g:go_highlight_variable_declarations` actually does something out of the box. - Add documentation for the new `g:go_highlight_variable_declarations` setting.
This adds a match for variable definitions so that they can be highlighted using a color scheme. Variable definitions are the
foo
andbar
in: