Review Request/New Framework: KF5::SyntaxHighlighting

Volker Krause vkrause at kde.org
Sat Sep 10 15:47:00 UTC 2016


Hi,

please review KF5::SyntaxHighlighting (syntax-highlighting in Git) for 
becoming a framework :)

This is a tier1/functional version of the Kate syntax highlighting engine. 
It's not tied to a particular output format or editor engine, the interface is 
basically just passing in a line of text and getting back a set of formatting 
instructions. A QSyntaxHighlighter and a HTML CLI highlighter are included, 
for example.

Use Cases

- I initially started this for use in GammaRay's QRC browser (which can embed 
into QtCreator, making using the KXmlGui-dependent Kate part problematic)
- It's already used in KDAB's internal QML-based training presentation tool
- Kate, obviously (see below)
- possibly replacing a few hand-written highlighters in KDE PIM (Sieve, 
message source, diff attachments), and enabling inline attachment highlighting
- the Kate team apparently also had some demand for this in the past, e.g. for 
use in CLI tools

Relation to Kate

I showed my work on this to the Kate team at Akademy, originally to get help 
regarding some semantic corner cases in the highlighting files, however the 
feedback I got was a plan to turn this into a framework, and a migration 
strategy for Kate, therefore the recent activity into that direction :)

The migration would happen in small steps, the first one being Kate switching 
to use the syntax definition files from the new library, as well as the 
indexing and meta data loading code. More features would follow in the 
subsequent releases, together with making the corresponding API officially 
public. Future steps might include syncing the format/theme settings, 
determining which syntax to use for a given file, and of course the ultimately 
switching the entire syntax highlighting related code over to the new library. 

For this all to start, we'd need an initial KF5::SyntaxHighlighting release 
first though, to not have KTextEditor depend on something unreleased.

Regards,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160910/6bfb6ffc/attachment.sig>


More information about the Kde-frameworks-devel mailing list