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

elextr notifications at xxxxx
Thu Oct 3 00:07:16 UTC 2019


> The highlighting is already implemented in the plugin, see the code below and yes it's using indicators

Ahh, they followed my advice before I gave it, excellent :grin:

> The issue is that the colors are fixed coded into the plugin.

Ok, then I strongly suggest just making it manually configurable.

Trying to automatically adjust to the theme is tricky because the plugin is highlighting the whole tag and that has different styles for element name, attribute names, and attribute values, so its quite likely that part of a tag will clash unless you somehow consider all the tag styles. 

I guess you would need to consider the actual colours for SCE_H_TAG, SCE_H_TAGUNKNOWN,	SCE_H_ATTRIBUTE, SCE_H_ATTRIBUTEUNKNOWN, SCE_H_NUMBER, SCE_H_DOUBLESTRING, SCE_H_SINGLESTRING, SCE_H_OTHER, SCE_H_COMMENT, SCE_H_ENTITY, SCE_H_TAGEND all of which can occur in a tag IIUC.

> So I wondered if there is an already implemented, re-usable way to read in color/style values.

Not that I'm aware of any way, but highlighting[mappings].[hc] is @b4n's baby and maybe its hidden away there somewhere. 

But plugins can read the styles from Scintilla [eg foreground](https://www.scintilla.org/ScintillaDoc.html#SCI_STYLEGETFORE).


-- 
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-537730757
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20191002/12ba9923/attachment-0001.html>


More information about the Github-comments mailing list