Editor support for Basalt plugins: autocompletion, diagnostics and builds.
Basalt DevTools is part of the Basalt Project. It turns an editor into a place to write plugins for Basalt Server and Basalt Proxy, and builds on two other pieces instead of reimplementing them:
- LuaLS (the
sumneko.luaextension) is the engine. It does the completion, hover documentation, go to definition and type checking. - Kiln is the verifier. It reads the whole plugin and reports what is wrong
with its manifest, its
requires and its use of the Basalt API.
DevTools is what connects them to Basalt: it gives LuaLS the API of the product you target, and shows Kiln's findings in the Problems panel.
VS Code is the main editor. A JetBrains plugin (IntelliJ IDEA 2025.3 and newer) lives in intellij/.
- Autocompletion and documentation for the Basalt API (
log,players,worlds,on,cmdand the rest), from definitions that LuaLS loads for the target you picked. - Problems panel: Kiln runs when the extension starts and on every save of a Lua file or
plugin.toml. - Commands:
Basalt: Check PluginandBasalt: Compile Plugin. - Snippets:
onfor an event handler andcmdfor a command. - Server and proxy: the
basalt.targetsetting switches the API that is completed and the checks that are run.
- VS Code 1.90 or newer. The Lua language server extension installs with it.
kilnon thePATH, or its location inbasalt.kilnPath.
The extension turns on when the open folder contains a plugin.toml.
| Setting | Default | Meaning |
|---|---|---|
basalt.target |
server |
The product the plugin is for: server or proxy |
basalt.kilnPath |
kiln |
The Kiln executable |
basalt.checkOnSave |
true |
Run Kiln when a Lua file or plugin.toml is saved |
The names of an API live in Kiln, in api/<target>.api. DevTools turns that file into LuaLS annotations:
python3 scripts/generate-definitions.py ../Kiln/api/server.api server \
--events ../Server/server-plugins/src/PluginEventTypes.cpp \
--events ../Server/server-plugins/include/basalt/server/plugins/PluginHookEvents.defA name with a hand-written signature in types/<target>.lua (players, worlds, menus, forms, positions, items and the
rest of the objects a plugin touches) keeps it; --events (once per event source) adds one class per event and the on and watch overloads
that go with it; any other name is declared with .... This writes definitions/server/basalt.lua. The extension adds definitions/<target>/ to Lua.workspace.library in
the workspace settings, so what the editor completes and what Kiln accepts come from the same list.
- Add
api/<target>.apito Kiln and a row for the target there. - Run the generator for it, as above, and commit the new
definitions/<target>/basalt.lua. - Add the target to the
basalt.targetvalues inpackage.json.
Every commit to main publishes a release, <minecraft>.<n> such as 26.3.4, on the
releases page, with SHA256SUMS. Take
Basalt-DevTools-VSCode-<version>.vsix and install it with Extensions: Install from VSIX, or
code --install-extension <file>. The extension also needs Kiln.
To build the package yourself:
npm install -g @vscode/vsce
vsce packageintellij/ holds the IDE plugin: Tools | Basalt | Check Plugin and Compile Plugin run Kiln, its findings appear in a
Basalt tool window (double click opens the line), Kiln runs again when a Lua file or plugin.toml is saved, and
Sync API Definitions copies the ---@meta definitions of the target into .basalt/api/ so a Lua plugin for the IDE
completes them. The target, the Kiln path and the save check are under Settings | Tools | Basalt.
The release carries Basalt-DevTools-IntelliJ-<version>.zip; install it with
Settings | Plugins | Install Plugin from Disk. To build it yourself:
cd intellij && ./gradlew buildPlugin # build/distributions/basalt-devtools-intellij-<version>.zipGPL-3.0-only. See LICENSE.