The last time I’ve managed to setup Lua environment on macOS. Now lets try to see if we can do the same on Windows.

We download the binary from https://code.google.com/archive/p/luaforwindows/downloads – the installer is simple.

Lua setup on Windows

Just few nexts and license agreement and we are good to go.

lua in command line

Lets see if we can run lua from Sublime Text and Visual Studio Code.

Sublime

Sublime Text again is as easy as changing the build system to Lua. Everything works by default. This is being a trademark for Sublime – it supports a lot from the default setup and even if you need to do some custom stuff – it’s doable. What about Visual Studio Code?

Visual Studio Code

Well it’s again down to installing the same extensions – so lets just link to the post about setting up macOS environment. And as on macOS we need to configure task runner.

Lua set up in Visual Studio Code

What about the full Visual Studio?

Visual Studio 2015

I don’t think I would ever need that setup but just for the sake of checking it out lets see if we are able to configure VS with Lua. There’s also an extension available for the regular VS. Download it form Visual Studio marketplace – VisualStudioExtensionForLua. Simple installer will guide you through the process. it looks like we should be good to go but for some reason the only additional option is “Select Lua host” as seen on the below picture

Lua launcher options

Setting any Lua program doesn’t do anything useful. I though that just drop this but checking the project description on GitHub “The extension currently supports editing intelliSense, syntax colorization, formatting, and error squiggles. It also supports single Lua file debugging.” exposes that it might provide some debugging functionalities which might be useful when trying to figure out issues. I think I would give it another go – maybe try to compile from sources and describe it in another post.

So we have set up Lua coding environment on both macOS and Windows. In the next post lets try do write some code in lua.