[Geany-devel] Improved syntactic highlighting for Haskell
elextr at xxxxx
Wed Aug 4 13:26:26 UTC 2010
On 4 August 2010 23:18, Krasimir Angelov <kr.angelov at gmail.com> wrote:
> Dear Geany Hackers,
> I am using Haskell for most of my work and I want to have better
> syntactic highlighting for it. After I successfully compiled and
> installed Geany on my computer I did some fixes in the lexer. The
> patch is attached.
> This is the list of problems that I fixed:
> - some keywords were not listed in filetypes.haskell
> - in Haskell there are some words that are keywords only in some
> context. For example here:
> import Foo as Bar
> 'as' is a keyword but in all other contexts it is a normal
> identifier. There are some other keywords like that
> - The highligthting was failing if the operators are not separated by
> spaces. For example here:
> '+' is not highlighted. It worked fine only if I write 10 + 20.
> - There was highlighting for data types, classes and instances but it
> didn't work correctly. For example:
> class Foo x where ....
> here Foo is highlighted as class name. Unfortunately this worked
> correctly only for very simple cases. For example
> this is also correct declaration:
> class Eq x => Foo x where
> but in this case Eq will be highlighted which the right class name
> is Foo. Since this case could be solved only by implementing
> a full parser, I just removed this feature. It is not very useful anyway.
> I hope that this patch will be added in the main repository. Let me
> know if there is some special procedure for sending patches.
> Best Regards,
The Scintilla editing component (everything in the Scintilla
directory) is an independent project at http://www.scintilla.org.
Geany tries to only use unmodified versions from that project. Could
you please send your changes to Scintilla and they will flow through
I probably should let you know that Scintilla has just undergone a
significant and partly incompatible change in lexer structure, so your
patches may need to be adjusted for the Lexer of the new Scintilla.
> Geany-devel mailing list
> Geany-devel at uvena.de
More information about the Devel