I just suspect not many people will use Geany for Visual Prolog
Sounds reasonable. Let's just settle for enough SWI-PL keywords to provide a common denominator between the Vim and VS Code implementations. Type specifiers are unique to Visual Prolog and could be better implemented by a tags parser anyway. Serious users would expect their custom types to be styled the way `typedef`'d structs currently are in C and family.
Scintilla lexers are C++, so in theory they could do anything, just somebody has to code it :-)
Yeah, you should be able to do more things in the code than using regular expression.
Well, being easy but inefficient allowed Python an PHP to become the institutions they are today. Scintilla has followed that tradition to great success.
There was a [proposal made][0] a long time ago to teach Scintilla how to consume flex files. The idea was logical but completely antithetical to the nature of C++, as it would have meant that "Scintilla lexers could be resumed[^1] to more readable definition files, instead of inextricable suite of if / elseif / goto code."
[^1]: The OP is French and seems to have directly translated *résumé* in the sense of *abridged*, *reduced*, etc.
[0]: https://sourceforge.net/p/scintilla/feature-requests/1074