PDA

View Full Version : Scintilla features with QSyntaxHighlighter



jokoon
15th November 2010, 14:33
Hello !

I gave up using QScintilla since Scintilla has to be tweaked in order to highlight different classes of keywords.

I wanted to know what features I can integrate "easily" with Qt thanks to classes such as QSyntaxHighlighter or others.

Just asking if those features can be made:
- Stream/line comments, #preprocessors, strings and characters
- Function declaration (scintilla doesn't do it by default, but textmate does, it's great I think).
- Brace match on cursor
- character operators coloring (such as "[]{}()+*-/^&%!=|:;.<>")
- color certain keyword classes differently

I don't know what you guys think about Scintilla, but the code is enormous, I agree that it's good that it highlights a lot of languages, does code folding, coffee etc, but I couldn't at least customize my lexer, the code looks quite ugly and Scite doesn't build natively on mac. Maybe it is very fast, but I can't really compare to a similar application done with another code parser, for languages such as C++, python or HTML.

Timoteo
15th November 2010, 16:14
Have a look at this (http://doc.qt.nokia.com/4.7/richtext-syntaxhighlighter.html) and do some quick modification to see how it goes for you. I would say that nothing you've mentioned is going to be hard to implement.

Timoteo
18th November 2010, 03:51
I was curious about this subject so I decided to follow up. Here's an attached screen of the results.

5478