Open elliotpeele opened 5 years ago
Take a look at the following comment in the java-prettify library that Gerrit uses:
In summary, it says that the fact that only comments are highlighted is by design. Thus, this should be "fixed" in that library, not in Gitiles.
Don't we need both https://github.com/aristanetworks/gitiles/commit/75f4e71aa04fda97c8adff7c0b16106d247630ee and the fix in java-prettify?
I think the change in java-prettify would be enough due to what I've explained in the last paragraph here.
But even then, the Go team's position on syntax highlighting is that there should be no highlighting at all; you won't see any syntax highlighting in https://go.dev/play/, nor in the Go docs, etc. So I'm not sure how to proceed with this.
Agree to disagree with Rob Pike on this :(
https://groups.google.com/g/golang-nuts/c/hJHCAaiL0so/m/kG3BHV6QFfIJ
On a more serious note though looks like java-prettify is based on https://github.com/googlearchive/code-prettify which has been archived, maybe it's time to move to something else? This kind of syntax highlighting seems really useful to me:
Agree to disagree with Rob Pike on this :(
https://groups.google.com/g/golang-nuts/c/hJHCAaiL0so/m/kG3BHV6QFfIJ
I'm also in favor of syntax highlighting, but the only thing that bothers me is that the Go team is also using gitiles: https://go.googlesource.com/. I think if we added syntax highlighting they would come after us ;)
(Despite this, they are also hosting a mirror in GitHub, and Github does provide syntax highlighting for Go: e.g. https://github.com/golang/go/blob/master/src/fmt/format.go)
On a more serious note though looks like java-prettify is based on https://github.com/googlearchive/code-prettify which has been archived, maybe it's time to move to something else?
I totally agree! Also, the java library hasn't been actively maintained for a few years, so that's another reason for switching to something else.
This kind of syntax highlighting seems really useful to me:
Believe it or not, I'm also using this plugin in Vim for syntax highlighting :P It is indeed very useful!
I would like to have golang syntax highlighting for at least keywords and strings. The highlighting in place now only covers comments.