Hi, in hightlighting.c there is a comment: `/* ... keyword_idx is used for both style_sets[].keywords and scintilla keyword style number */ `
Is it possible to make this independant? This would be nice. I'm writing a new lexer, which requires independ (ordered) keyword lists from styling lists (see highlightingmappings.h HLStyle vs. HLKeyword).
Definition is as follows:
``` #define highlighting_lexer_UNI SCLEX_UNI static const HLStyle highlighting_styles_UNI[] = { // list index { SCE_UNI_S_DEFAULT, "Default", FALSE}, // 0 { SCE_UNI_S_COMMENT, "CommentOneline", FALSE}, // 1 { SCE_UNI_S_COMMENT_ML, "CommentMultiline", FALSE}, // 2 { SCE_UNI_S_COMMENT_DOC, "CommentDocument", FALSE}, // 3 { SCE_UNI_S_PRIMARYKEY, "PrimaryKey", FALSE}, // 4 { SCE_UNI_S_SECONDARYKEY, "SecondaryKey", FALSE}, // 5 { SCE_UNI_S_KEYLIST3, "KeyList3", FALSE}, // 6 { SCE_UNI_S_KEYLIST4, "KeyList4", FALSE}, // 7 { SCE_UNI_S_KEYLIST5, "KeyList5", FALSE}, // 8 ....
``` ``` static const HLKeyword highlighting_keywords_UNI[] = { // list index { SCE_UNI_K_DEFAULT , "Default", FALSE}, // 0 { SCE_UNI_K_COMMENT , "CommentOneline", FALSE}, // 1 { SCE_UNI_K_COMMENT_ML_S , "CommentMultilineStart",FALSE}, // 2 { SCE_UNI_K_COMMENT_ML_E , "CommentMultilineEnd", FALSE}, // 3 { SCE_UNI_K_COMMENT_DOC_S , "CommentDocumentStart", FALSE}, // 4 { SCE_UNI_K_COMMENT_DOC_E , "CommentDocumentEnd", FALSE}, // 5 { SCE_UNI_K_PRIMARYKEY , "PrimaryKey", FALSE}, // 6 { SCE_UNI_K_SECONDARYKEY , "SecondaryKey", FALSE}, // 7 { SCE_UNI_K_KEYLIST3 , "KeyList3", FALSE}, // 8 { SCE_UNI_K_KEYLIST4 , "KeyList4", FALSE}, // 9 { SCE_UNI_K_KEYLIST5 , "KeyList5", FALSE}, // 10 ....
``` As you can see, it is not possible to match list indices for keywords and styles by list index (e.g. Multiline Styles have two keyword lists, one for start and one for end of comment). So I plan to assign to SCE_UNI_K_.. values from 100 and to SCE_UNI_S_.. values from 200.
Anyway, in highlighting.c, when filling from filetypes.xxx, there should match to correct style_sets.styleset - searched by "guint style;" (HLStyle) and "guint id;" (HLKeyword).
br HoTschir