superqt provides a code highlighter subclass of QSyntaxHighlighter
that can be used to highlight code in a QTextEdit.
Code lexer and available styles are from pygments python library
List of available languages are available here.
List of available styles are available here.