This Vim plug-in uses the LuaInspect tool to (automatically) perform semantic highlighting of variables in Lua source code. It was inspired by lua2-mode (for Emacs) and the SciTE plug-in included with LuaInspect. For more information about the plug-in please refer to its homepage or the project page on GitHub:
If you have questions, bug reports, suggestions, etc. the author can be contacted at firstname.lastname@example.org. If you like this plug-in please vote for it below!
Unzip the most recent ZIP archive file (see below) inside your Vim profile directory (usually this is "~/.vim" on UNIX and "%USERPROFILE%\vimfiles" on Windows), restart Vim and execute the command ":helptags ~/.vim/doc" (use ":helptags ~\vimfiles\doc" instead on Windows). Now try it out: Edit a Lua file and within a few seconds semantic highlighting should be enabled automatically!
Note that on Windows a command prompt window pops up whenever LuaInspect is run as an external process. If this bothers you then you can install my shell.vim plug-in (see vimscript #3123) which includes a DLL that works around this issue. Once youve installed both plug-ins it should work out of the box!
Lots of miscellaneous changes (see http://github.com/xolox/vim-lua-inspect/commits/) to make the plug-in compatible with the newest release of LuaInspect, which itself includes bug fixes that fix bugs in this plug-in (e.g. when you add some empty lines to the start of a Lua buffer the highlighting would break, this turned out to be a bug in the Metalua lexer).