It's available since 2019, even in Lexilla 5.1.5: https://sourceforge.net/p/scintilla/feature-requests/1265/
To use a new lexer a whole new filetype must be added to Geany to integrate it, see HACKING, there is a section on adding a filetype. Somebody needs to make a pull request to do that.
Quote from `HACKING`:
scintilla/src/Catalogue.cxx - add a LINK_LEXER command *manually*
Seems like this file has been removed/renamed/whatever?
I've tried to build and run my [experimental changes](https://github.com/froonix/geany/tree/cil) without this step, but it keeps crashing after selecting the CIL highlighter at the `strcmp()` line:
``` #0 __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:102 #1 0x00007ffff7cb388a in CreateLexer(char const*) (name=0x0) at lexilla/src/Lexilla.cxx:403 #2 0x00007ffff7c89bc3 in sci_set_lexer (sci=sci@entry=0x555556191110, lexer_id=lexer_id@entry=127) at sciwrappers.c:704 ```
```cxx EXPORT_FUNCTION Scintilla::ILexer5 * CALLING_CONVENTION CreateLexer(const char *name) { AddEachLexer(); for (unsigned int i = 0; i < catalogueLexilla.Count(); i++) { const char *lexerName = catalogueLexilla.Name(i); if (0 == strcmp(lexerName, name)) { return catalogueLexilla.Create(i); } } return nullptr; } ```
My `filetypes.cil` is still unfinished, but I don't think this is the reason for the crash? `catalogueLexilla` and the fact, that I've skipped the "catalogue" code change sounds related. ^^
I'm a little bit lost now...
Alright, crash fixed: I've added the Lexer module variable at `AddGeanyLexers()` (Lexilla.cxx) :-)
Maybe it's time to finish my `filetypes.cil` file now to get the desired output...
Closed #3305 as completed via #3480.
github-comments@lists.geany.org