Vector35/snippets

syntax highlighting

Closed this issue · 2 comments

syntax highlighting

Some relevant links:
QSyntaxHighlighter would be most performant but require a lot of hackery to get state/tokenization right with python. Pygments would work great but requires more work on the QT side and re-parsing after every keystroke.

https://wiki.python.org/moin/PyQt/Python%20syntax%20highlighting
https://doc.qt.io/qtforpython/PySide2/QtGui/QSyntaxHighlighter.html
https://doc.qt.io/qt-5/qtwidgets-richtext-syntaxhighlighter-example.html

Added this a while back and forgot to close.