yi-editor / yi

The Haskell-Scriptable Editor
GNU General Public License v2.0
1.51k stars 200 forks source link

Integrate highlighting-kate #393

Open ethercrow opened 11 years ago

ethercrow commented 11 years ago

Original author: gree...@gmail.com (March 03, 2008 23:22:17)

highlighting-kate provides haskell support for syntax highlighting of over 50 languages, by reading Kate's syntax description files. This could be used to quickly expand the number of syntaxes yi can highlight.

http://johnmacfarlane.net/highlighting-kate/doc/index.html

Original issue: http://code.google.com/p/yi-editor/issues/detail?id=98

ethercrow commented 11 years ago

From JeanPhil...@gmail.com on March 04, 2008 08:24:46 I see two problems with this:

I imagine we could write a Kate-Xml ~> Alex translator though.

ethercrow commented 11 years ago

From gwe...@gmail.com on December 16, 2008 20:27:15 JPB: even if it doesn't support incremental highlighting, it could still be useful.

How? Well, imagine a user opens up a MediaWiki file, or a PHP file, or a Nasm file (or any of the many other formats highlighting-kate provides but yi doesn't). Why couldn't the mode enter a loop, where say, every 10 keystrokes, while the user isn't typing anything, the mode calls the 'highlight' function on the buffer?

Speed isn't really an issue here if the user isn't doing anything; even a very large 312k file is parsed in about 4seconds, and more normal sized files in tenths of seconds.