Re: [Haskell-cafe] RE: highlighting-kate - syntax highlighting library
On Sun, 2008-02-03 at 19:38 -0200, Felipe Lessa wrote: On Feb 3, 2008 6:42 PM, mgsloan [EMAIL PROTECTED] wrote: Would this be suitable for a text editor? Note that we already have a binding to GtkSourceView, see http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-SourceView.html BTW, if anyone wants to update this binding to the GtkSourceView 2.x api that'd be great. The api has not changed much so the changes should be pretty simple. The advantage is that the 2.x version has a much better highlighting engine which allows more accurate highlighters. Duncan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] RE: highlighting-kate - syntax highlighting library
Awesome! It looks quite nice, though it takes ages to compile. Would this be suitable for a text editor? One issue with text editors is you don't want to reprocess the entire file for each highlight. This, combined with multi-line syntactic elements, such as multiline strings or comments, makes for a rather awkward combination. It becomes a bit harder to predict the scope, highlighting wise, of editing actions. It may not really be necessary to do this very well. I for one find it annoying when you introduce an opening/closing symbol, it freezes for an instant, and the highlighting of the rest of the document alternates... So perhaps it could check if you're introducting a multiline element at the end when navigating off, re-evaluate highlighting of the rest of the document. Regardless of if the library can handle the requirements of text-editing in its current state, it looks like it wouldn't be too hard to add. Most of the work has been done :) Thanks! -Michael Sloan http://mgsloan.nfshost.com Hello all, I've been working on a source code syntax highlighting library. It is now somewhat usable, and help would be welcome in testing it further, so I'm making it publicly available: darcs get http://johnmacfarlane.net/repos/highlighting-kate Currently, the following languages are supported: AdaAsp AwkBash Bibtex C CmakeColdfusion Commonlisp Cpp CssDDiff Djangotemplate Doxygen DtdErlang FortranHaskell Html Java Javadoc Javascript Json Latex LexLiterateHaskell LuaMakefile Matlab Mediawiki Nasm Objectivec Objectivecpp Ocaml Pascal Perl PhpPostscript Prolog Python Ruby Scala Scheme Sgml SqlSqlMysql SqlPostgresql Tcl Texinfo XmlXslt Yacc The parsers for individual languages are automatically generated from Kate syntax definitions. The xml files have been included in the repository, together with the program that converts them to Haskell modules. There's also a standalone program, Highlight, that you can use to test the highlighting. (See README for instructions.) Bug reports and patches are welcome. Note that I don't want to make any manual modifications to the generated modules in Text/Highlighting/Kate/Syntax. Changes should be made either in the source xml files or in the program ParseSyntaxFiles.hs that generates these modules. John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] RE: highlighting-kate - syntax highlighting library
Michael == mgsloan [EMAIL PROTECTED] writes: Michael Awesome! I've been working on a source code syntax highlighting library. It is now somewhat usable, and help would be welcome in testing it further, so I'm making it publicly available: darcs get http://johnmacfarlane.net/repos/highlighting-kate Currently, the following languages are supported: Ada Asp Awk Bash Bibtex C Cmake Coldfusion Commonlisp Cpp Css D Diff Djangotemplate Doxygen Dtd Erlang Fortran Haskell Html Java Javadoc Javascript Json Latex Lex LiterateHaskell Lua Makefile Matlab Mediawiki Nasm Objectivec Objectivecpp Ocaml Pascal Perl Php Postscript Prolog Python Ruby Scala Scheme Sgml Sql SqlMysql SqlPostgresql Tcl Texinfo Xml Xslt Yacc Not to me. Where is Eiffel? -- Colin Adams Preston Lancashire ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] RE: highlighting-kate - syntax highlighting library
On Feb 3, 2008 6:42 PM, mgsloan [EMAIL PROTECTED] wrote: Would this be suitable for a text editor? Note that we already have a binding to GtkSourceView, see http://www.haskell.org/gtk2hs/docs/current/Graphics-UI-Gtk-SourceView.html . Cheers, -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Re: highlighting-kate - syntax highlighting library
Not to me. Where is Eiffel? I've just added it. The library is so big already that I left out a bunch of languages for which there are Kate syntax definitions. But I'm happy to add them on request. John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe