I'm writing an RSL editor for a personal project, and i'd like to customize the CPP lexer available in QScintilla because all i need is just a few extra keywords to be highlighted, but i cant really find out how to add them.
any help? cheers
edit - Ive been playing with snippets ive found and ive managed to get new keywords to work by subclssing the CPP lexer and creating a key set, but it only works if o overwrite the existing keyset on index 1
from PyQt4 import Qsci
class RSLLexer(Qsci.QsciLexerCPP):
def __init__(self, parent):
super(RSLLexer, self).__init__()
def keywords(self, keyset):
if keyset == 1:
return b'surface'
return Qsci.QsciLexerCPP.keywords(self, keyset)