[Geany] Adding Syntax Highlighting for New FIletype Problem
Andrew Rowland
weibullguy at xxxxx
Sat Sep 20 01:09:45 UTC 2008
On Fri, 2008-09-19 at 17:17 +0100, Nick Treleaven wrote:
> 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
The link was the trick to figuring out everything that needed to be
edited! Thanks for that. R script syntax highlighting is working now.
I'm not a Windows user, so I only made the changes necessary for a *nix
build of Geany. The following is the resulting patch against version
0.14:
http://svn.cross-lfs.org/svn/repos/patches/geany/geany-0.14-R_highlighting-1.patch
I also added a link to the patch on the Geany Wishlist page.
Thanks again,
Andrew
More information about the Users
mailing list