[textadept] Multilang lexers

From: mitchell <c....at.caladbolg.net>
Date: Mon, 18 Oct 2010 00:26:01 -0400 (EDT)

Hi,

Just wanted to let everyone know that I just committed changes to
Scintillua[1] (the editing component used by Textadept) that make multiple
language lexing as fast as single language lexing. This is a HUGE
improvement and should make editing large HTML, RHTML, PHP, etc. files
MUCH more convenient. I had been trying to figure out how to do this since
ta 1.1 so I'm happy a solution is finally in place.

For those of you that want this now, you'll need to grab all the
modified lexers (and lexer.lua) and compile the new LexLPeg.cxx into ta.

The lexer documentation has changed a bit; you can see the changes here
[2].

This solution did require a compromise: true embedded preprocessor
language highlighting is not available anymore. From the LuaDoc:

-----
True embedded preprocessor language highlighting is not available. For
most cases this will not be noticed, but code like
   <div id="<?php echo $id; ?>">
or
   <div <?php if ($odd) { echo 'class="odd"'; } ?>>
will not highlight correctly.
-----

I think this compromise is well worth the boost in speed.

[1]: http://scintillua.googlecode.com
[2]: http://code.google.com/p/scintillua/source/diff?spec=svnc9a0bc1bac4838d25f1aecc77e89c6196302bb10&r=c9a0bc1bac4838d25f1aecc77e89c6196302bb10&format=side&path=/lexers/lexer.lua

mitchell
Received on Mon 18 Oct 2010 - 00:26:01 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:52:13 EST