Howdy,
I’m currently developing a plugin that occationally outputs messages in a custom panel. As there might be multi-line messages involved and I could not come up with a ‘‘result_file_regex’’ that matches such messages, I’m using custom code to perform the highlighting.
It works great, but I’m now facing the (cosmetic) problem that I don’t know which scope name to use for the add_region function to match the color used by the default build results highlighting. Therefore whenever I’m using F4/Shift F4 to step through the messages, I end up with different coloring for the first line vs. the rest.
I’m attaching a screenshot for illustration. F4 causes the first line to be highligthed in blue, and the rest is highlighted in black (using custom code) but it should rather use the same blue as the first line.
The API doc only lists ‘string’ and ‘comment’ as possible values, and I could not find any information about other scope names, but it surely should be possible to use the standard build output color as well.
I’m speaking about this function:
sublime.View.add_regions(key, [regions], scope, <icon>, <flags>)
I would appreciate any input. Thanks in advance.
Cheers,
Marco