Editor Extensions¶
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.
External editors¶
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.
Name | Details | Core Autocomplete | Price |
---|---|---|---|
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 |
Plugins / Extensions¶
For Visual Studio Code and Atom, we have collected a few extensions that make developing in Core and Lua easier:
Visual Studio Code¶
Plugin Name | Details |
---|---|
VSCode-Lua | Adds Lua support |
Lua Language Server or Lua Coder Assist | Auto Completion and more |
Atom¶
Plugin Name | Details |
---|---|
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 |
Autocomplete¶
We provide autocompletion files with all Core API for VS Code, Atom and every other editor that supports .luacompleterc
:
Visual Studio Code & Atom¶
- Download: luacompleterc.zip
- Install: Extract the
.luacompleterc
file to yourDocuments\My Games\Core\Saved\Maps
folder.
Note for Visual Studio Code:
You need to add the folder containing .luacompleterc
to the library settings of the Lua Language Server extension.
Example: "Lua.workspace.library": {"C:\\Users\\Manti\\Documents\\My Games\\Core\\Saved\\Maps": true}
Also we are going to set Diagnostics: Enable
to off
since we are going to use the luacheck integration that comes with VSCode-Lua.
Installing a Linter¶
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.exe
to a folder and add it to yourPATH
environment variable. (HowTo)
In addition, we provide a .luacheckrc
settings file with all Core API whitelisted so they don't show up as undeclared global variables:
- Download: luacheckrc.zip
- Install: Extract the
.luacheckrc
file to yourCore\Prod\Platform\Saved\Maps
folder.
Was this page helpful? Can it be improved? Please let us know your feedback!