Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>TuaNew to Visual Studio Code? Get it now.
Tua

Tua

SolenodonteLabs

|
13 installs
| (0) | Free
Build LOVE2D games in typed Lua with completion, visual previews, hot reload, tests, and debugging.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Tua for VS Code

Build LÖVE games in typed Lua, with the editor beside you from first line to running game.

Tua checks your code as you write, helps you navigate a growing project, and emits readable Lua 5.1-compatible source for LuaJIT and LÖVE 11.x. The extension includes the matching language server, so you can open a Tua project and start editing without installing Rust or Node.js.

Install from Visual Studio Marketplace · Install from Open VSX · Download a VSIX · Read the quickstart

A Tua game workspace with source editing, run configurations, project files, and asset references

Make the game, understand the code

Write Run Explore
Get completion, hover, signatures, diagnostics, and type explanations while editing Tua and project Lua. Build and launch LÖVE, use hot reload, run Busted tests, or debug with source-mapped breakpoints. Inspect assets, modules, signals, sprites, state machines, behavior trees, and live game state.

Tua's native generics and protocols help keep APIs precise across files. You can still call ordinary Lua modules and LÖVE APIs; the generated Lua remains available beside your source whenever you want to see what will run.

Opt-in localization completes catalog keys and shows locale coverage. Typed save contracts help check persisted game state and recover damaged saves. Both game helpers are included in generated output only when referenced.

Start in four steps

  1. Install the extension and open your game folder in VS Code.
  2. Run Tua: Initialize Tua Project from the Command Palette, or open an existing folder with a tua.toml.
  3. Edit src/main.tua. Completion, diagnostics, navigation, and hover work immediately.
  4. With LÖVE 11.x installed, run Tua: Run LOVE Project.

A small Tua file looks familiar to Lua developers:

type Player = { x: number, y: number, speed: number }

local player: Player = { x = 160, y = 120, speed = 90 }

function love.update(dt: number)
  if love.keyboard.isDown("right") then
    player.x += player.speed * dt
  end
end

function love.draw()
  love.graphics.print("Hello from Tua", player.x, player.y)
end

The extension bundles its server for your platform. A separate CLI is useful for terminal builds, but it is not required for editor features. See Installation if you prefer a manual VSIX or a custom server.

For coding agents, supported VS Code agents can discover Tua's read-only MCP tools from the extension. Editor agents can also build, run, debug, and read bounded run and paused-debug context through Tua's editor tools. Run Tua: Set Up Agent Tools from the Command Palette to register a selected terminal agent and get a stable path to the bundled CLI. If its CLI is unavailable, the command copies manual settings. Live debugger context requires the editor. Setup does not add tua to your shell's PATH.

See your project before you run it

The following views were captured from the extension running in VS Code with its optional Indigo Carbon theme. The Starfall example supplies the game source. Static previews read source without executing the game; enable experimental previews with tua.preview.enabled. The seeded procedural-map preview runs only its own temporary sample project and never executes your game.

State machine · Follow states and event routes

Select a state or transition for details, then open its source. The graph shows the declared title, playing, and over states; it is separate from live runtime inspection.

Static state-machine graph with play and crash transitions and source-linked details

Sprite animation · Check frames without launching LÖVE

Switch animations, pause playback, step through frames, and inspect the selected rectangle on the sprite sheet.

Astronaut sprite preview with animation, playback, frame, and sheet controls

Module graph · Trace why a file is in the build

Follow imports from the entry module, inspect exports and dependents, and filter unresolved imports or cycles.

Module dependency graph showing Starfall modules and the selected entry module

Runtime inspector · See the state of a running game

Opt into inspection for a development run to view stores, state machines, signals, entities, and object pools. This screenshot shows a live scene, pool counts, and store values.

Live runtime inspector showing scene state, object-pool counts, and player store values

Behavior trees also have a source-linked static tree preview. Asset, SignalBus, ECS, object-pool, audio, and localization explorers help reveal relationships that are otherwise spread across game files.

Editing Tua

When you call a method on an imported class, completion shows its members and signature help shows the expected arguments. Hover shows the inferred type. If a value unexpectedly resolves to any, run Tua: Explain Type / Why Is This Any? to trace where that information was lost.

Diagnostics and quick fixes appear beside the code. You can organize imports, apply safe fixes, or generate stubs for missing protocol methods. LÖVE callbacks have snippets and signature checks; API calls have parameter documentation. The LÖVE 11.5 reference is also available offline from the Command Palette.

To inspect what will run, use Tua: Open Generated Lua Beside Tua and jump between source and output. Tua also provides formatting and semantic highlighting. Format on save can be enabled in VS Code settings. Normal completion works by default; inline suggestions and the local Ollama fallback are separate opt-in features.

Run, test, and inspect

Task In VS Code
Play or rebuild Choose a named Run configuration, then use Run, Stop, Restart, or Hot reload. Use Tua: Show Run Options in Run and Debug if the Run and Debug section is collapsed.
Find game logs Open Tua Console in the bottom panel or click Game Logs in the status bar after a run. Filter by level or scope; click a file.tua:line label to jump to its source. Use the optional Log API for scoped messages.
Debug Choose Debug Tua LOVE Game from Run and Debug → Select and Start Debugging, or use Tua: Debug LOVE Project. Install Second Local Lua Debugger for source-mapped breakpoints and stepping.
Test Discover and run Tua/Busted specs in the Testing view, including file and case runs. Install Busted for the interpreter you use.
Inspect Enable the development-only Runtime Inspector, then start a new run. Pause or refresh snapshots without pausing the game.
Profile Select the pulse button in Run and Debug → Tua LOVE Game, or run Tua: Profile LOVE Game. Open a sampled Tua line or its generated Lua, export a .cpuprofile from the results view or Tua: Export Last LOVE CPU Profile, or open its approximate CPU timeline in the optional Flame Chart Visualizer.
Package Select the package icon in Tua’s Run view, choose a portable .love, Windows, macOS, web, or project-defined custom target, then reveal the finished package.

The Tua Activity Bar view groups project files, assets, signals, modules, ECS, pools, audio, run sessions, and project checks. Right-click a Tua file or declaration for relevant previews and source actions.

Optional setup

Tua: Set Up Tua offers a theme, a layout preset, file-icon choices, shader-tool checks, inlay-hint settings, and optional companion extensions for debugging and shader highlighting. The flame hot-reload action is built in. Opening setup does not install extensions or change settings. The language features work with your existing VS Code theme and layout.

Visual previews, runtime inspection, local inline suggestions, and Ollama each have separate opt-in controls. The extension sends no telemetry or project source uploads. It requires VS Code 1.94 or newer; running a game requires LÖVE, and debugging or Busted tests require their respective tools.

Learn more

  • Quickstart · Language guide · Examples
  • LSP features and settings · Debugging · Testing
  • Editor reference for named runs, multiplayer, setup, controls, configuration, and detailed preview behavior.
  • Troubleshooting · Report an issue

The screenshots show actual editor views. Screenshot capture and verification notes are available for contributors.

Dialogue file icon

.tdialogue files use the dedicated dialogue artwork, with light/dark variants. Choose Preferences: File Icon Theme → tua Icons to use the bundled mapping. Other file-icon themes can use the language default, but may override or hide it according to VS Code’s file-icon rules.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft