NOTE: This is only in the preparation. The goal is to insert LoganDark/lua-lexer and make it available.
This extension for Mediawiki add a Lua lexer for modules provided by the Scribunto extension. This makes it possible to build parse tree for Lua code, to facilitate further lexical analysis in a collaborative environment.
LuaLexer depends on the Scribunto extension, and provide a parse tree for Lua code.
-
Download from Github (zip) and place the file(s) in a directory called LuaLexer in your extensions/ folder.
-
Add the following code at the bottom of your LocalSettings.php:
wfLoadExtension( 'LuaLexer' );
-
Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
LuaLexer uses Mediawiki-Vagrant, and an instance can be made quite easily. A more complete setup can be found at the page vagrant.
-
Make sure you have Vagrant, etc, prepare a development directory, and move to that directory.
-
Clone Mediawiki
git clone --recursive https://gerrit.wikimedia.org/r/mediawiki/vagrant .
-
Add the role unless #? has been merged. (You need git-review to do this.)
git review -d ?
-
Run setup.
./setup.sh
-
Enable role for LuaLexer. This pulls in the role for Scribunto, which then pulls in additional roles.
vagrant roles enable lualexer
-
Start the instance.
vagrant up
-
Done.