Skip to content

VS Code and LuaLS

Piggo41 edited this page Oct 16, 2026 · 9 revisions

VS Code and LuaLS

Home / Getting started / VS Code and LuaLS

The BetaMoon API extension supplies definitions for BetaMoon on Minecraft Beta 1.7.3. LuaLS uses them for API completion, hover documentation, signatures and type checking.

Install and enable

  1. Open BetaMoon API on the Visual Studio Marketplace and select Install to open VS Code. Alternatively, open VS Code's Extensions view and search for @id:OWeinert.betamoon-api.
  2. Confirm installation in VS Code. Lua by LuaLS is installed as a dependency.
  3. Open the folder containing your scripts and run BetaMoon: Enable API for Workspace Folder. Select the scripts folder if the workspace contains multiple folders.

With the VS Code command-line tool installed, you can also run:

code --install-extension OWeinert.betamoon-api

Use the global betamoon directly, as shown in Getting started. Do not copy the editor definitions into .minecraft/betamoon/scripts or load them from a script. Minecraft supplies the API at runtime; the extension only describes it to the editor.

Project settings

The command adds the bundled definitions directory to the selected folder's LuaLS libraries and preserves existing entries. It updates .luarc.json or .luarc.jsonc when present at the folder root, preserving comments and other settings. Otherwise it updates Lua.workspace.library in the folder's VS Code settings. Save pending configuration edits first. Open the folder containing the LuaLS configuration; externally configured Lua.misc.parameters config files are not managed.

Enabled workspaces refresh their library path after extension updates. Other workspaces and global user settings are untouched. The saved path is specific to the local or remote extension installation; each collaborator should enable their own copy. For SSH, WSL and containers, install the extension remotely. Browser-only VS Code is not supported.

Run BetaMoon: Disable API for Workspace Folder before uninstalling to remove the library entry. Disabling or uninstalling the extension by itself leaves the saved settings in place.

Other LuaLS editors

The matching addon source also works as a regular LuaLS addon. Add the checkout's library directory to your project's LuaLS workspace.library setting. Use one installation method per project to avoid duplicate definitions.

Choosing a version

Use a definition version that matches your BetaMoon runtime and consult the API reference for supported fields and limitations. Editor type checks cannot verify runtime IDs, resources or world state.

Clone this wiki locally