Re: [code] [Textadept] Enriching Lua highlighting, have some questions

From: Advert Slaxxor <advertslaxxor.att.gmail.com>
Date: Wed, 2 Apr 2014 21:56:58 +0100

On Mon, Mar 31, 2014 at 8:00 PM, Mitchell <m.att.foicica.com> wrote:

> Hi Advert,
>
> I think the idea is good in principle and quite useful. However, marking
> text based on context using a lexer is probably not the best idea. For
> performance reasons, lexers are only given parts of the entire buffer to
> lex at a time. A better method for you would probably be to have a function
> process the entire buffer and use indicators to mark text instead of using
> lexer styles. This function could be run in an interval, when the buffer is
> saved, etc.
>
> Textadept's source code has examples of indicator use for marking text.
>
> Cheers,
> Mitchell
>

Figured that out after messing around with it for a little while -- it'd
require large amounts of backtracking/seeking, or embedded lexers. That'd
be quite the mess! :)

I'll have rethink this quite a bit, it seems. Sometimes you just see the
meaty functions doing things, not realizing the supporting code buried
underneath!

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 02 Apr 2014 - 16:56:58 EDT

This archive was generated by hypermail 2.2.0 : Thu 03 Apr 2014 - 06:34:28 EDT