in hightlighting.c there is a comment:
/* ... keyword_idx is used for both style_sets[].keywords and scintilla keyword style number */
I think you are confused about what the comment says. It says that the index to style_sets[].keywords
, which in your case is highlighting_keywords_UNI
has to be the same as the index to the keywords defined in scintilla lexer. In other words, that the first number in highlighting_keywords_UNI
will have to correspond to the keyword index in the lexer. Indices to highlighting_styles_UNI
are completely independent.
Also the comment is for merge_type_keywords()
which is used to inject ctags types to scintilla and is irrelevant for your case.
So I plan to assign to SCE_UNI_K_.. values from 100 and to SCE_UNI_S_.. values from 200.
You can't do that (at least if you plan to submit your lexer to Lexilla) - SCE_UNI_S_
are generated automatically by a script in lexilla:
https://github.com/ScintillaOrg/lexilla/blob/master/include/SciLexer.h
There's no exported SCE_UNI_K_
(you can of course use it within your lexer). highlighting_keywords_UNI
will just have to use the correct indices.
/* TODO: style_id might not be the real array index (Scintilla styles are not always synced
- with array indices) */
I have no idea what this comment tries to say to be honest and if it's related to lexers in any way.
In any case, if you plan to submit a pull request with the lexer to Geany, you have to get it merged to the Lexilla project first - we only accept official lexers.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.