Ernesto Posse a écrit :
Hi. I'm interested in having a mode for a language I am working on,
and since it's syntax is close to Python's I have created my own
properties file based on python.properties. While the lexer does
recognize the keywords of my language with the new file, I cannot set
different colours for them.
[...]
If I understand correctly, the 'style.python.5' variable, as any
other property, is "global" so when the python.properties file sets
this, whichever is set last will take effect. But if I set the keyword
style for my language as
style.klt.5=fore:#00007F,bold
or
style.kiltera.5=fore:#00007F,bold
the lexer will ignore it (as python.properties is imported after
kiltera.properties.)
No. Doc. says: style.lexer.stylenumber, so the middle part is the name
of the lexer, which is hard-coded in the lexer source file.
Your properties above are ignored because they are not know by SciTE (no
relevant lexer in Scintilla).
Is there any way to reuse the python lexer and have a different
style scheme for other languages, or all languages based on the same
lexer will necessarily have the same style scheme?
The later... If you don't use the Python lexer, just comment out its
include line. If you need it, you are out of luck.
Unless you can recompile Scintilla: copy LexPython.cxx to
LexKiltera.cxx, make relevant changes in the file (the name of the
lexer!), declare it in the iface file, regenerate the source files and
recompile.
--
Philippe Lhoste
-- (near) Paris -- France
-- http://Phi.Lho.free.fr
-- -- -- -- -- -- -- -- -- -- -- -- -- --
_______________________________________________
Scite-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scite-interest