Home

Awesome

Teal for Visual Studio Code Build Status

Provides IntelliSense and syntax highlighting for Teal in Visual Studio Code.

Requirements

Make sure that the Teal compiler (v0.12.0 or later) is available in your PATH:

luarocks install tl

Installing

Download this extension from the VS Code Extension Marketplace or the Open VSX Registry.

Snippets

TriggerNameBody
reqLocal requirelocal name = require("module")
locLocal variablelocal name = value
foriipairs loopfor k, v in ipairs(sequence) do ... end
forppairs loopfor k, v in pairs(table) do ... end
lrecLocal record definitionlocal record name ... end
grecGlobal record definitionglobal record name ... end
lenuLocal enum definitionlocal enum name ... end
genuGlobal enum definitionglobal enum name ... end

FAQ

'Module not found' errors

By default, this extension runs tl check at the root of the workspace.

If your code resides in subdirectories (such as src/ or lib/), you need to add the directories to tlconfig.lua at the root of the workspace:

return {
    include_dir = {
        "src/",
        "lib/"
    }
}

[Error] messages at the bottom right of the screen

Make sure you are using the latest version of the tl compiler. If upgrading tl does not fix the problem, then please create an issue.

Changelog

See CHANGELOG.md for release notes.

Contributors

Contributions are greatly appreciated! Feel free to fork this repository and open a pull request on GitHub.