Re: Next generation of lexers

From: Robert <ro....at.web.de>
Date: Fri, 30 Apr 2010 12:31:46 +0200

On Wed, Apr 28, 2010 at 8:07 AM, Brian Schott <briancsch....at.gmail.com> wrote:
> I've created an issue in Google Code for this.
> http://code.google.com/p/scintillua/issues/detail?id=7
>
> 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.
>

Brian,
could you maybe test this, please:
http://bitbucket.org/rgieseke/textadept-lexers/raw/bd9b66968781/tex.lua
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
well.
I added math environment shortcuts \(, \) etc. as well.
Further Latex escapes like \$ and square brackets as an operator.

Mitchell,
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

Robert

-- 
You received this message because you are subscribed to the Google Groups "textadept" group.
To post to this group, send email to textadept.at.googlegroups.com.
To unsubscribe from this group, send email to textadept+unsubscribe.at.googlegroups.com.
For more options, visit this group at http://groups.google.com/group/textadept?hl=en.
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