Scintilla is a text editor. Scintillua adds dynamic Lua LPeg lexers to Scintilla for multiple languages. According to the documentation, Scintillua can be used as a library:
Using Scintillua as a Lua Library
In order to use Scintillua as a Lua library, simply place the lexers/ directory in your Lua path (or modify Lua’s package.path accordingly), require() the library and load() a lexer, and call that lexer’s lex() function. Here is an example interactive Lua session doing this:
$> lua Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio > lexer_path = '/home/mitchell/code/scintillua/lexers/?.lua' > package.path = package.path..';'..lexer_path > c = require('lexer').load('ansi_c') > tokens = c:lex('int void main() { return 0; }') > for i = 1, #tokens, 2 do print(tokens[i], tokens[i+1]) end type 4 ansi_c_whitespace 5 type 9 ansi_c_whitespace 10 identifier 14 operator 15 operator 16 ansi_c_whitespace 17 operator 18 ansi_c_whitespace 19 keyword 25 ansi_c_whitespace 26 number 27 operator 28 ansi_c_whitespace 29 operator 30
I was wondering if it would be possible to use those lexers as a lua replacement for minted or listings? In addition, it seems that Scintillua supports code folding that could be used to underline code structure as in an old question of mine. What would be the basic code for interacting between TeX and lua (catcodes, etc.)?
lex()and generates the appropriate TeX code. – Aditya Aug 17 '16 at 17:21TeXwithoutTeXinluatex(I don't want to deal with verbatim atTeXlevel). Development is here, really early stage... – cjorssen Oct 11 '16 at 10:05