Re: [textadept] TeX lexers

From: Robert <ro....at.web.de>
Date: Fri, 17 Jun 2011 18:16:00 +0200

Hi Mitchell,

On Fri, Jun 17, 2011 at 3:44 PM, mitchell <c....at.caladbolg.net> wrote:
[...]
> Look at the Rails, CUDA, and GLSL lexers. They reuse the Ruby and CPP lexers
> but add small changes. I would recommend this method since it does not
> depend on exposing internal lexer patterns or that their names stay the same
> and that any original lexer changes/additions/fixes are reflected in the new
> lexer.
>

thanks, that'll be more stable.

>> About folding, in plain TeX and Context I have
>> \begintt ... \endtt or \starttyping ... \endtyping blocks. It is not
>> possible to handle these with the simple folding, correct?
>> They can only match text, so I have to write a function?
>
> I don't understand why not. If you add tokens that capture those blocks you
> can add them to _foldsymbols, no?
>
It seems to only work with built-in token names like l.COMMENT,
l.KEYWORD - when I have fold patterns
[l.COMMENT] = { ['\\begin'] = 1, ['\\end'] = -1 },
['environment'] = { ['\\begin'] = 1, ['\\end'] = -1 },
only the first works.
What is the getStyleAt function doing/looking for?

> Once you finish these lexers I would like to add/update the Scintillua ones
> since I don't know anything about *TeX.
>

Sure :-) I put them on GitHub first for feedback and testing.

Robert
Received on Fri 17 Jun 2011 - 12:16:00 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 12:11:23 EST