Porting KTextEditor to KSyntaxHighlighting

After several years, the time has come that KTextEditor finally starts to use more of KSyntaxHighlighting than just the syntax definitions resources.

At the moment, we still do everything on our own (parsing the xml, doing the highlighting, …) and only use the XML files bundled inside the KSyntaxHighlighting library as “code sharing”.

I started a “syntax-highlighting” branch in ktexteditor.git to change that. Dominik helped out by starting to add missing API to KSyntaxHighlighting that will ease the porting.

The first step will be: Having full working highlighting without color scheme or configuration support inside the branch.

If that is done, we will take a look at the scheme/configuration stuff.

The current state only handles the highlighting, folding is ATM out of order. It speaks for the quality of Volker’s KSyntaxHighlighting implementation that with minimal additions only 1-2 hours of work did lead to a “usable” result.

=> obligatory screenshot

Beside the missing folding markers, it doesn’t look that bad, or?

I hope we can work on that during Akademy, too, to finally move on and not keep all things duplicated just because we got no time to work on it.

Btw., thanks again to Volker for the work on the framework!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.