-
Notifications
You must be signed in to change notification settings - Fork 591
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 Syntax Highlighting has many bugs #48
Comments
@jskinner Are you guys looking to maintain these |
Would it be easier to just take the syntax parsing that the go-sublime package does? |
I remember that package having similar bugs, I wouldn't be surprised if the authors here re-formatted |
Is there anyone at Sublime that will ever be actively working on getting this to a better state? |
@stevekuznetsov ive been wondering this myself, their communication seems a little inept |
It seems like someone is looking at this now. |
@wbond Can we get any communication on if there is a member of your team that is tasked with updating these syntax files? Will we ever see this fixed? |
@stevekuznetsov I have been working through various issues and PRs recently. The best way to help would be to provide small self-contained examples of syntax that causes issues. That way I can make a test out of it to use while implementing a fix. Big PRs that change a lot are harder to review and accept. I don't believe there is any specific roadmap for syntax tweaks, but I'll be spending some time on it. |
@wbond The original post in the issue highlights some of the issues I have found. Is this a reasonable format for you? Please let me know how to best aid you in your efforts. |
I can re-type the samples provided in this issue. For future reports, if you create one issue per bug, with a description and text snippet of code, that will allow me to get them fixed most efficiently. |
@wbond awesome, will do. |
Fixed the following issues:
Commit c21ab36 also improves the symbol list by including the receiver type, making it possible to disambiguate between receiver functions for different types. The highlighting of the parameters and return types is part of the color scheme. It may be possible to further improve the parsing of params and return types, but I know with the color scheme I use (Base 16), they are highlighted specially. If you are interested in specific highlighting of params, please open a new issue with details of how you think it could be improved. |
Personally (without Go experience), I think in FWIW, I derived this list from the textmate list and added scopes for punctiation, since they didn't exist there. |
@FichteFoll I used the existing scope names (including It certainly seems that there could be some work done at a high level to survey the existing syntaxes, extract scope information and try to document usage for the sake of making them more consistent and for informing color scheme authors. That however, would be a separate issue from this, and should be opened as such. |
@wbond +1 for Base 16 highlighting suggestion |
@wbond true, I'll see what I can do. |
As the image shows below, there are a number of issues with the Go syntax highlighting provided by this package (and inherited from GoSublime?):
%s
"
strings do not syntax highlight correctly for numbered formatting arguments like%[1]s
type
keyword to stop highlightingfunc
keyword or the function nameThe text was updated successfully, but these errors were encountered: