Re: [textadept] TeX lexers

From: Robert <ro....at.web.de>
Date: Tue, 21 Jun 2011 13:09:31 +0200

Mitchell,

On Mon, Jun 20, 2011 at 6:47 PM, mitchell <c....at.caladbolg.net> wrote:
[...]
> You are overwriting the tex lexer's _tokenstyles. Your latex lexer needs to
> be like this:
>
> local tex = l.load('tex')
> _rules = tex._rules
> _rules[1] = { 'whitespace', ws }
> _rules[2] = { 'comment', comment }
> _rules[3] = { 'environment', environment }
> table.insert(_rules, 4, { 'parts', parts })
> _tokenstyles = tex._tokenstyles
> _tokenstyles[#_tokenstyles + 1] = { 'parts', l.style_class }
> _tokenstyles[#_tokenstyles + 1] = { 'environment', l.style_tag }
>
Thanks, this worked. I pushed the current versions, that do not share
with the tex lexer anymore. It seems too much overhead.

If anyone likes to test these, I'd appreciate if the choice of styles
for the environments makes sense in other people's themes.
Or should we maybe have default styles for headers and environments?
These are probably quite common, for example in Markdown.

Robert
Received on Tue 21 Jun 2011 - 07:09:31 EDT

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