Sublime Forum

Qt 5 syntax / highlight in ST3?

#1

I like the way some KDE editors (Kwrite, Kate) highlight C++ code which uses Qt classes. All instances of Qt classes, variables, and other Qt-keywords (“slot”, “signal”, “emit”,…) are all colored in cyan (by default). I’ m rather surprised to see that there is no any package for that in ST3. The only thing I found is Qt completions.

I’m rather new to ST3, and have only general idea about syntax definitons, scopes, etc. In principle, I might consider writing a scope for Qt myself, but the problem is that I cannot use regexps here - I just need to list somehow all the names that actually exist in Qt5, and there are hundreds and perhaps thousands of them. Maybe it is possible to use the completion file which has a list of all those names, and build a highlight scope based on that?

Any prompts would be highly appreciated.

0 Likes

#2

Qt repos

Docs

1 Like