[Github-comments] [geany/geany] Question: highlight-API: is loading/querying of individual styles possible? (#2331)

LarsGit223 notifications at xxxxx
Wed Oct 2 16:06:59 UTC 2019


@elextr:

> Ahh, probably the best would be to use indicators for that,

My question is not about how highlighting itself can be implemented. The highlighting is already implemented in the plugin, see the code below and yes it's using indicators:
```
static void highlight_tag(ScintillaObject *sci, gint openingBracket,
                          gint closingBracket, gint color)
{
    scintilla_send_message(sci, SCI_SETINDICATORCURRENT, INDICATOR_TAGMATCH, 0);
    scintilla_send_message(sci, SCI_INDICSETSTYLE,
                            INDICATOR_TAGMATCH, INDIC_ROUNDBOX);
    scintilla_send_message(sci, SCI_INDICSETFORE, INDICATOR_TAGMATCH, rgb2bgr(color));
    scintilla_send_message(sci, SCI_INDICSETALPHA, INDICATOR_TAGMATCH, 60);
    scintilla_send_message(sci, SCI_INDICATORFILLRANGE,
                            openingBracket, closingBracket-openingBracket+1);
}
```
The issue is that the colors are fixed coded into the plugin. And as always this can just be fine for some themes and for others it's causing bad readability because the color/style cannot be adjusted to the theme.

So I wondered if there is an already implemented, re-usable way to read in color/style values. Colorschemes does not seem to add a new key and access it somehow. I would prefer to define a key explicitly for the pairtaghighlighter plugin. But colorschemes seem to be bound to predefined meanings/styles.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2331#issuecomment-537564659
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20191002/76976606/attachment.html>


More information about the Github-comments mailing list