Editor Support

To have basic support for TypeScriptToLua it is enough to configure your editor for TypeScript support.

Language Service Plugin

Sometimes TypeScriptToLua has to report it's own errors during the compilation. To have the same errors displayed in your editor, you can use a language service plugin.

To use it either get a Visual Studio Code extension or add it to your project.

Build Tasks

Most of advanced code editors can build your project with npm scripts.

package.json
{
"scripts": {
"build": "tstl",
"dev": "tstl --watch"
}
}

Visual Studio Code

VSCode supports running npm scripts using tasks. To define a task, create a .vscode/tasks.json file or press F1 and run Tasks: Configure Task command. Example configuration:

tasks.json
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "dev",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": { "reveal": "never" },
"group": { "kind": "build", "isDefault": true }
}
]
}