KTextEditor depends on KSyntaxHighlighting

Recently, the KSyntaxHighlighting framework was added to the KDE Frameworks 5.29 release. And starting with KDE Frameworks 5.29, KTextEditor depends on KSyntaxHighlighting. This also means that KTextEditor now queries KSyntaxHighlighting for available xml highlighting files. As such, the location for syntax highlighting files changed from $HOME/.local/share/katepart5/syntax to


So if you want to add your own syntax highlighting files to Kate/KDevelop, then you have to use the new location.

By the way, in former times, all syntax highlighting files were located somewhere in /usr/share/. However, since some time, there are no xml highlighting files anymore, since all xml files are compiled into the KSyntaxHighlighting library by default. This leads to much faster startup times for KTextEditor-based applications.

Running Unit Tests

If you build Kate (or KTextEditor, or KSyntaxHighlighting) from sources and run the unit tests (`make test`), then the location typically is /$HOME/.qttest/share/org.kde.syntax-highlighting/syntax.

4 thoughts on “KTextEditor depends on KSyntaxHighlighting”

  1. That’s the second time the path’s changed in a few years, last time it caused some confusion, several forum threads and a couple of bug reports.

    I take it the previous path is (again) ignored; is there any reason not to keep checking the old location when the syntax hasn’t changed?

  2. Never mind, I see the old path actually was included as a fallback this time.

    // backward compatibility with Kate
    dirs=QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral(“katepart5/syntax”), QStandardPaths::LocateDirectory);

Leave a Reply