How to customize syntax highlighting for errors in Go?

First of all I'd like to you to spend some time to spot the error here:

 

If you can't see it in 10 seconds, there's probably something wrong with the UX here.

People have asked for a "Problems" window but so far they're not getting it. https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000074179-Unable-to-see-Problems-Tool-Window-in-GoLand

So I have wanted to customize the syntax highlighting to make a "RED BACKGROUND" for erroneous spots in the code:

In this window I'm not seeing any "Syntax Error" or related items to customize. (There's "invalid escape" but that's only for strings.)

(If this exists and I'm not finding it, that's another UX issue.)

If GoLand is not planning to bring users an obvious way to see the errors (without compiling the code explicitly), can it possibly perhaps allow some customization? VSCode funnily excels at this and can show you Problems window even for Go.

2
2 comments
Official comment

The code highlighting section you're looking for is under Preferences | Editor | Color Scheme | General. Check out Errors and Warnings; there you'll find all kinds of them.

And while we're here, it's definitely a UX problem that one needs to look for an error with their eyes. One of the solutions is the so-called Problems View, and GoLand will eventually get it at some point. But as we're not there yet, one can use existing helpers. For instance, in the upper-left corner, one can find an indicator of the current file state. On your screenshot, it's red, which means that there's an error somewhere. Pressing F2 repeatedly guides you through errors in the file. If there are no errors, it navigates to the first warning and so on. Using this approach, one always looks at the same place (the indicator) and presses the same button (F2).

Thanks this helps a lot.

0

Please sign in to leave a comment.