[Geany] Adding Syntax Highlighting for New FIletype Problem

Nick Treleaven nick.treleaven at xxxxx
Fri Sep 19 16:17:13 UTC 2008


On Fri, 19 Sep 2008 05:46:19 -0400
Andrew Rowland <weibullguy at charter.net> wrote:

> On to the syntax highlighting.  I shamelessly stole LexR.cxx from
> scintilla and I've created data/filetypes.r.  I then wrote the
> styleset_r_init() and styleset_r() functions, added
> init_styleset_case(GEANY_FILETYPES_R, r) to highlighting_init_styles
> (), and added styleset_case(GEANY_FILETYPES_R, r)
> to highlighting_set_styles().
> 
> Unfortunately, the only style that is applied to R scripts is the
> default style.  If I change the hex color codes in highlighting.c or
> in data/filetypes.r, the new colors will be used.  However, none of
> the other styles are being used.

As Jason Oster suggested, probably Scintilla isn't finding the lexer.

You need to edit:
scintilla/KeyWords.cxx
scintilla/Makefile.am
(and scintilla/makefile.win32)

For an example, see the changes for LexBasic.cxx:
http://geany.svn.sourceforge.net/viewvc/geany?view=rev&revision=1635

Regards,
Nick



More information about the Users mailing list