Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Syntax highlighting is wrong #1267

Closed
jhaynie opened this issue Oct 6, 2017 · 6 comments
Closed

Syntax highlighting is wrong #1267

jhaynie opened this issue Oct 6, 2017 · 6 comments

Comments

@jhaynie
Copy link

jhaynie commented Oct 6, 2017

This may not be a golang specific issue but something in the core package. But it doesn't seem to happen in other non-go files.

Some files, often, when I open them (or select them if already opened), will highlight certain blocks of code that don't seem to have any discernable reason to be highlighted. For example:

screen shot 2017-10-06 at 9 24 04 am

If I simply select somewhere in the file and make a change (for example, click space and then delete to remove it), the bad highlights go away and the file is rendered correctly:

screen shot 2017-10-06 at 9 27 08 am

This is pretty difficult to work with. I've tried various different themes and all exhibit this behavior so it doesn't seem to be related to that.

I can't figure this out and it's driving me nuts!! :)

VSCode: Version 1.17.0 (1.17.0) be377c0faf7574a59f84940f593a6849f12e4de7
Golang Plugin: Version 0.6.66

Any help would be much appreciated.

@ramya-rao-a
Copy link
Contributor

@jhaynie Sorry for the delay in responding to this issue.

Thats the code coverage showing up.

You might have go.coverOnSave enabled.
Disable that, and those highlights should go away.

Let me know if that doesn't work

@jhaynie
Copy link
Author

jhaynie commented Oct 12, 2017

@ramya-rao-a thanks so much. i never would have figured that out !!!

@ramya-rao-a
Copy link
Contributor

How did you end up enabling the code coverage any way :) ?

@jhaynie
Copy link
Author

jhaynie commented Oct 12, 2017

well, i guess it was turned on but didn't realize the highlighting would only show when i saved it. that wasn't intuitive until you explained it. it might have been better to indicate something in a hover etc.

@ramya-rao-a
Copy link
Contributor

The default value for go.coverOnSave setting is false.

The below is the description of the setting that shows up on hover.
image

Regardless, am glad that is resolved now. Happy Coding!

@esemplastic
Copy link

Dear @ramya-rao-a could you please take a quick look and confirm the #1277 ?

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants