-
Notifications
You must be signed in to change notification settings - Fork 645
Syntax highlighting does not support new %w specifier for wrapped errors #2819
Comments
I've been wanting to try and fix this for a while, but failed to find the relevant TextMate grammar file in this repo. I think it's probably in the main release of VSCode, particularly as syntax highlighting is available before the extension is installed. |
Following up, the file is here: https://github.com/microsoft/vscode/blob/master/extensions/go/syntaxes/go.tmLanguage.json Apparently it's copied from: https://github.com/atom/language-go/blob/master/grammars/go.cson and changes should be made there, have make a pull request, so let's see what happens! |
So looks like this isn't going to happen soon. My pull request was closed because Atom are migrating to another syntax system. The VSCode syntax is a fork of the Atom one, and they don't accept pull requests (turns out someone else had a crack at this already): microsoft/vscode#81015 |
Will have to wait, thank you |
@dhowden is right. The colors are controlled by the grammar being used and the grammar is part of the main VS Code project. Therefore, please log this issue in the VS Code repo Also, please note that we can't possibly have different grammars being used for different versions of Go. So any solution put in place here will be applied for any Go file regardless of the Go version being used. |
For posterity, I've submitted an issue here. Who knows how long it will take, but in the meantime you can hack it into VScode yourself. The relevant syntax is buried somewhere in
and simply tack on a As to the issue of older versions erroneously highlighting |
New Go format specifier %w, introduced with Go 1.13 to support error wrapping is not supported by syntax highlighter
The text was updated successfully, but these errors were encountered: