Skip to content

Lua Dev Environment

Benjamin Staneck edited this page Jul 24, 2018 · 8 revisions

Setting up the environment

Code from Git

We suggest using a Git checkout outside of the Interface\Addons to develop WeakAuras. The Git repository does contain a few files not related to the addon but to the development of it that you should take advantage of. So checkout the repository to a different path and use mklink /H to link from the Interface\Addons folder to your Git checkout.

Important: The checkout does not contain the needed libraries so you will have to either install those separately or copy the Libs folder from a WeakAuras package downloaded from Curse/WowAce into you checkout, it will then get ignored by Git and therefore not overwritten when you switch branches etc.

A proper Editor

There are of course several good editors out there for Lua development, but we suggest using Atom or Visual Studio Code since they have tons of good plugins available for Lua/WoW dev.

Atom

Visual Studio Code

Installing a Linter

Luacheck, which also serves as a static analyzer, is the Lua Linter to use and WeakAuras comes with a .luacheckrc config file that tells it what to look for and it will point out any mistakes you may make.

You can download a statically linked binary with all deps included from here and put it somewhere on your PATH.

Getting a plugin for your editor

Atom

Visual Studio Code

  • Base Linter: Not needed.
  • Plugins:
    • For Luacheck: Not needed, comes with vscode-lua.

Clone this wiki locally