Re: [code] [scintillua] New lexers from vis editor community

From: Mitchell <>
Date: Thu, 6 Oct 2016 16:52:06 -0400 (EDT)

Hi Marc,

On Wed, 5 Oct 2016, Marc André Tanner wrote:

> On Wed, Oct 05, 2016 at 08:44:00AM -0400, Mitchell wrote:
>> Hi Marc,
>> On Wed, 5 Oct 2016, Marc André Tanner wrote:
>>> Hi,
>>> I would like to propose a few new LPeg lexers which were contributed
>>> for my vis editor:
>>> * protobuf by David B. Lamkins
>>> * crystal by Michel Martens
>>> * fstab, networkd, systemd, dsv and an improved pkgbuild by Christian Hesse
>>> They can be picked up from:
>>> and should hopefully work as is with textadept.
>> Thanks. Do you happen to know the file extensions used by those lexers?
> The associations currently used in vis can be found here:
> protobuf: .proto
> crystal: .cr
> networkd: .link, .network, .netdev
> systemd: .automount, .device, .mount, .path, .scope, .service, .slice, .socket, .swap, .target, .timer
> fstab: fstab
> dsv: group, gshadow, passwd, shadow
> The last couple are fairly *nix specific but I wanted to mention them
> anyway in case you (or anyone else) find them useful.

Okay thanks. I'm not sure how I feel about the *nix ones right now, but
I'll commit Protobuf and Crystal for sure.

>>> Also one of the users noticed that the "text" lexer (supposedly to
>>> disable syntax highlighting completely?) does not work in vis. Is
>>> it functional in textadept?
>> Yes, "text" is the default lexer for plain text in Textadept, and an
>> identical one, "container", is the default lexer for plain text in SciTE or
>> other Scintillua-based editors. What do you mean by "does not work"? Do you
>> get an error?
> Yes when attempting to lex something:
> $ lua5.2
> Lua 5.2.3 Copyright (C) 1994-2013, PUC-Rio
> > lexers = require('lexer')
> > lang = lexers.load('text')
> > lang:lex('foo')
> ./lexer.lua:1131: bad argument #1 to 'lpeg_match' (lpeg-pattern expected, got nil)
> stack traceback:
> [C]: in function 'lpeg_match'
> ./lexer.lua:1131: in function 'lex'
> This is with the lexer.lua from the vis repository which has a few
> changes compared to the one used in scintillua (though they shouldn't
> matter). Actually I just tried with the scintillua one and other than
> the line numbers, the error is the same.

Thank you for the example. I'll fix this. It apparently only manifests
itself when using Scintillua as a Lua library.

All of this will be in the next nightly.


You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Thu 06 Oct 2016 - 16:52:06 EDT

This archive was generated by hypermail 2.2.0 : Fri 07 Oct 2016 - 06:27:49 EDT