Help understanding QLexers
Detlev Offenbach
detlev at die-offenbachs.de
Sun Jan 24 18:41:43 GMT 2021
Hello,
as an alternative one could use Pygments and implement a custom lexer
with it. See the code of the eric IDE as an example. I did this kind of
integration years ago (somewhere between 5 and 10 years).
Detlev
Am 24.01.21 um 19:25 schrieb Andrea:
> On 23/01/2021 11:54, kristof.mulier at telenet.be wrote:
>> Hi Andrea,
>> Did you have a look at the QScintilla (unofficial) documentation page?
>> Here is the page about lexers:
>> https://qscintilla.com/#syntax_highlighting
>>
>> And here about your specific question:
>> https://qscintilla.com/#syntax_highlighting/subclass_qscilexercustom/all_about_styles
>>
>>
>> Hope it helps.
>>
>> Kind regards,
>> Kristof Mulier
>
> Reading the source code gives some hints.
>
> All lexers are really implemented in scintilla (e.g. LexerLua.cpp) in
> the lexers folder.
> The interface available in Qt is a little layer which does not really
> contain the full logic.
>
> This is probably the reason why the lexer in Qt has the functions
> lexer() and lexerId().
> It is to link to the "real" lexer.
>
> This probably answers my question and to add a new lexers it is a big
> task.
> Only answer is to reuse an existing one and change the keywords.
>
> Cheers
>
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the QScintilla
mailing list