Sublime Forum

Can I set the color of the line highlight from Build Output?

#1

When clicking an error line in Build Tool output, the editor very conveniently brings my cursor right to the line that the error occurs at, however it applies a color style to the line which is different from (less visible than) the default lineHighlight color.

For example, looking at Twilight.tmTheme:

<dict> <key>settings</key> <dict> <key>background</key> <string>#141414</string> <key>caret</key> <string>#A7A7A7</string> <key>foreground</key> <string>#F8F8F8</string> <key>invisibles</key> <string>#FFFFFF40</string> <key>lineHighlight</key> <string>#FFFFFF08</string> <key>selection</key> <string>#DDF0FF33</string> </dict> </dict>

lineHighlight is white with 8 transparency.

The color used in the case I described has to be at least twice as dark. I did a screenshot sample and the color of the faintly highlighted line is #171717. Not very far from the #141414 background of this style. Very hard to scan and find the line.

I did a search alpha-hex-values in my color theme files but did not find anything. Hopefully there is a name-key I can assign in my color scheme file that will let me specify the color of this.

In the meantime I resort to using a different color scheme.

Thanks.

0 Likes

#2

I ran into this problem as well, but I think I see what’s going on. It’s using the lineHighlight in your color scheme as usual, but because the Build Results panel gets the focus when you click in it, the line highlight color is the one used for unfocused windows, which is hard-coded in Sublime Text to be the lineHighlight color at half opacity. Sadly, there seems to be no way to fix this on our side; the developer would need to fix it. I think two things ought to be changed here:

  • It should be possible to specify the “unfocusedLineHighlight” separately in the tmTheme specification,

  • A line that is highlighted because of the Build Results panel should either use a different highlight color, or else have a special scope applied to it. The highlight or scope should be removed as soon as the user moves the cursor somewhere else.

0 Likes