There are a bunch of ways you can improve the experience of scripting in Core. If you are happy with the in-built editor, feel free to skip this section.
If you want Core to use an external editor by default when you open a script file, press Esc to open up the options, then go to "Settings" and then change the path for "External Script Editor" to the one you prefer.
There are of course several good editors out there for Lua development, but we suggest one of the following since they have tons of good plugins available.
|Visual Studio Code||Popular powerful editor with many plugins||Supported||Free|
|Atom||Middle-range power/speed editor with plugin support||Supported||Free|
|SublimeText||Lightweight text editor with plugins||Not Supported||Free Evaluation / Paid|
|Notepad++||Very lightweight text editor||Not Supported||Free|
For Visual Studio Code and Atom, we have collected a few extensions that make developing in Core and Lua easier.
|vscode-core||The official extension that adds support for the Core Games API to the Lua Language Server|
|vscode-lua||Adds Lua & Luacheck support|
If you have previously been using vscode-core together with the "Lua Coder Assist" extension, make sure to uninstall it for the best results.
Sumneko's Lua extension also comes with it's own "Diagnostics" feature, so if you have been using other extensions that use Luacheck and a
.luacheckrc file, you might want to either disable those extensions or the "Diagnostics" feature in Sumneko's.
|language-lua||Adds Lua support|
|autocomplete-lua||Adds Lua autocomplete|
|Linter||Adds linting support|
|Linter UI||Adds a UI to Linter|
|Linter: Luacheck||Adds Lua support to Linter|
For editors where we do not provide our own editor extensions, we supply a JSON dump of our API that can be used to create one. We also provide autocompletion files with all of the Core API for Atom and every other editor that supports
- Download: CoreLuaAPI.json
- Download: luacompleterc.zip
- Install: Extract the
.luacompletercfile to your
Luacheck, which also serves as a static analyzer, is the Lua Linter to use. You can add a
.luacheckrc config file to your project that tells it what to check for and it will point out any mistakes you may make. Check out their documentation for more info. A statically linked binary with all deps included is available on GitHub.
- Download: Luacheck
- Install: Copy
luacheck.exeto a folder and add it to your
PATHenvironment variable. (HowTo)
In addition, we provide a
.luacheckrc settings file with all Core API so they don't show up as undeclared global variables.
- Download: luacheckrc.zip
- Install: Extract the
.luacheckrcfile to your
If you want to use vscode-core together with a Luacheck extension, you might want to disable the "Diagnostics" feature in Sumneko's Lua extension.