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
x/playground: add code highlighting #28539
Comments
Duplicate of #21123, which was already a duplicate of a golang-nuts thread. I don't think anything has changed since. |
@mvdan Note that at the end of that golang-nuts thread, Andew Gerrand wrote:
This was back in 2012, but it appears that adding syntax colouring to the playground wasn't completely out of the question (in fact, Andrew explicitly said the change would be accepted). It is also still true that tour has a "Syntax on/off" button; so it wouldn't be that strange to add it to the playground. The other linked issue (#21123) wasn't really resolved with a final decision, the OP just closed it because they were able to find a playground clone with syntax highlighting. I think it would be nice to have a final and clear decision on this; for this reason I'm reopening this issue. cc @andybons |
I hadn't noticed that; reopening for now is indeed a good idea. |
Here we decided that syncing playground with a CodeMirror library (the one used by go-tour) is a no-go: #18723. Andy suggested to move the tour to simpler library instead of adding sophisticated lib to the playground for the sake of syntax highlighting. My opinion echoes Andy. It should be solved by adding custom code that does what is required only, no bloat and slow rendering. It should not be done by including big libraries where we would use 1% of functionality. |
Agreed with @ysmolsky. As we converge the codebases, we don't want to regress syntax highlighting on the tour, so it should remain supported across the two tools. As long as it's lazy-loaded and not on by default I don't see an issue. Merging into #18723 as this will be included. |
Duplicate of #18723 |
Is it possible to improve "Go Playground" code highlight?
And instead of black code have something like default github code highlight,
for example something like this.
The text was updated successfully, but these errors were encountered: