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

From: Marc André Tanner <>
Date: Wed, 5 Oct 2016 15:42:45 +0200

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.

> >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.


 Marc André Tanner >< >< GPG key: 10C93617
You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Wed 05 Oct 2016 - 09:42:45 EDT

This archive was generated by hypermail 2.2.0 : Thu 06 Oct 2016 - 06:45:23 EDT