Source code view widget
I need to view and edit code in my application. What is a good widget I could use to obtain syntax highlighting and features such as search&replace?
Sorry, KDE widgets would require too many dependencies and cross-platform support is not KDE's main priority unlike Qt's. Any others available?
The KSyntaxHighlighting framework is a tier 1 functional framework that solely depends on Qt (no dependency on Qt Widgets or QML), is very well unit tested, and licensed under the LGPLv2+.
@Wieland True but I considered Kate more relevant here as, from https://api.kde.org/frameworks/syntax-highlighting/html/index.html
To not turn this into yet another text editor, the following things are considered out of scope:
- code folding, beyond providing folding range information
- auto completion
- spell checking
- user interface for configuration
- management of text buffers or documents
If you need any of this, check out KTextEditor.
KDE widgets would require too many dependencies
Not all of them but this one is Tier 3 so I can see how this can scare people off but at the end of the day is very easy using CMake to build the whole KDE API environment
cross-platform support is not KDE's main priority
It's not neglected either btw, Kate works in all desktop environments supported by Qt
@VRonin Yes, all true. I used Kate as a plugin before, too. Works very well. But, if the OP doesn't want to use KTextEditor, I thought he might at least want to use the highlighter.
I've found https://github.com/edbee/edbee-lib since then which we'll be giving a go!