Re: Next generation of lexers

From: Robert <>
Date: Fri, 30 Apr 2010 12:31:46 +0200

On Wed, Apr 28, 2010 at 8:07 AM, Brian Schott <> wrote:
> I've created an issue in Google Code for this.
> I use LaTeX and various extension packages such as Beamer. The list of
> environments and commands is never going to be complete enough to
> highlight arbitrary Tex/LaTeX documents, so I think your solution of using
> local command = token('keyword', '\\' * l.word)
> is a good one.

could you maybe test this, please:
Saving it as latex.lua in your ~/.textadept/lexers should work.

It looks good on the documents I tested.
ConTeXt environments are covered as well (startsomething, stopsomething)
In LaTeX I changed the Math "strings" $ to environments as well. That
way, the math symbols inside inside the environments get lexed as
I added math environment shortcuts \(, \) etc. as well.
Further Latex escapes like \$ and square brackets as an operator.

if this makes it into the next beta:
In mime_types.conf
(The latex.lua could then be removed.)

-% Latex
-bbl latex
-dtx latex
-ins latex
-ltx latex
-tex latex
-sty latex
+ TeX
+bbl tex
+dtx tex
+ins tex
+ltx tex
+tex tex
+sty tex


You received this message because you are subscribed to the Google Groups "textadept" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at
Received on Fri 30 Apr 2010 - 06:31:46 EDT

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:43:44 EST