Overview and installation
What the Actus extension for VS Code adds to the language server, how to install it, and how it finds, downloads and verifies the compiler.
The extension is called Actus Language Support. Its publisher is
actus-lang and its identifier is actus-lang.vscode-actus. It is a separate
program from the compiler. It starts actus lsp for you, so what the editor
shows is what the compiler knows. The
Editor support page describes that server. This page
says what the extension adds.
What it adds
- A language for
.actfiles. Files that end in.actopen as Actus, with syntax colours,#line comments,"""documentation blocks and the snippets. - Role colours. The four roles have their own colours and are bold, both in the syntax colours and in the semantic tokens of the server. See Settings reference.
- The language server client. It runs
actus lspin your workspace folder and gives you errors, hover, go to definition, completion, rename, formatting and quick fixes, as far as the server offers them. A quick fix named Explain Actus E1005 is added to every diagnostic that has a code. It opens the text ofactus explainbeside the editor. - A toolchain installer. If the compiler is not on your machine, the extension downloads and checks it. See below.
- The ownership panel. A panel next to Terminal and Problems that lists, for each verb, every participant with its role, its state and what happened to it. See The ownership panel.
- Tests. The
meta testverbs of the workspace show up in the Test Explorer. See Tests in VS Code. - Commands, tasks and a status bar item. See Commands, tasks and the status bar.
- A new-project wizard and a helper that copies the configuration of
actus mcp.
What you need
- VS Code 1.85 or newer.
- A trusted workspace. In a workspace that is not trusted the extension does
not start the compiler and does not run any command. The Language Server view
shows
Workspace trust is required. When you trust the workspace, the server starts. - A compiler that the extension accepts. After the server starts, the
extension checks that it is Actus 0.1.0 or newer and that it speaks version 1
of the protocol and of the schema of the Actus requests. If it does not, the
server is stopped and the status says why, for example
Actus compiler 0.1.0 or newer is required. The panel history described in The ownership panel needs the data that Actus 0.3.0 sends. - What a program needs to run. The extension only installs the compiler. To run a program you also need a C compiler on Linux and macOS, and Build Tools for Visual Studio on Windows. See Install for the details.
Install the extension
The extension is Actus Language Support on the
Visual Studio Marketplace (opens in a new tab).
Its identifier is actus-lang.vscode-actus. Install it in one of these ways:
-
Open the Extensions view (
Ctrl+Shift+X, on macOSCmd+Shift+X), search forActus, and choose Install on Actus Language Support. -
Open Quick Open (
Ctrl+P, on macOSCmd+P), paste the line below and press Enter:text -
In a terminal:
bash
By default, VS Code updates the extension when a new version is published.

Install from a VSIX file
Each release of the extension repository,
github.com/actus-lang/vscode-actus, also has the extension as a VSIX file,
named like vscode-actus-0.2.0.vsix, together with a SHA256SUMS file. Use it
when you cannot reach the Marketplace:
You can also open the Extensions view, choose the menu ... at the top and then Install from VSIX....
Then open a .act file, or a folder that has an Actus.toml. The extension
starts when it sees an Actus file, and when VS Code has finished starting.
How the extension finds the compiler
When you set nothing, the extension looks for actus in this order and uses
the first one that exists:
target/debug/actusin your workspace folder. This is for people who build the compiler in the folder they have open.../actus/target/debug/actus, next to the folder of the extension.actuson yourPATH.current/bin/actusin the Actus folder: the folder inACTUS_HOMEwhen that variable is set,%LOCALAPPDATA%\Actuson Windows, and~/.actuson the other systems. This is where the install script puts it.- The folder that VS Code keeps for the extension, in
toolchain/current/bin. ~/.cargo/bin/actus.
If you set actus.lsp.path to
another value, that path is used. If the file is not there, the extension writes
a line in its output and falls back to the list above.
If none of them is found, the extension installs the compiler, as the next section says.
The toolchain installer
What it does depends on the setting
actus.toolchain.autoDownload:
| Value | When the compiler is not found |
|---|---|
auto | the extension installs it at once. This is the default. |
prompt | the extension asks: Install Actus, Manual Install or Not Now. |
off | the extension installs nothing. The status says the compiler is missing. |
The installer works for the systems that have a release: Linux on x86-64, macOS on arm64 and Windows on x86-64. On another system it stops with the message that there is no prebuilt release.
It is only used when the path is the default one. If actus.lsp.path names a
file that does not exist and no actus can be found, the extension does not
install anything.
What it downloads and checks
For the version in actus.toolchain.version
the installer does these steps. The value latest means the newest release,
which the extension finds by following the redirect of
https://github.com/actus-lang/actus/releases/latest.
- It downloads
SHA256SUMSof the release fromhttps://github.com/actus-lang/actus/releases/download/v<version>/. - It downloads the archive for your system from the same place:
actus-<version>-x86_64-unknown-linux-gnu.tar.xz,actus-<version>-aarch64-apple-darwin.tar.xzoractus-<version>-x86_64-pc-windows-msvc.zip. - It computes the SHA-256 of the archive and compares it with the entry in
SHA256SUMS. If they differ, or if the file has no entry, it stops and installs nothing. The checksum file comes from the same release as the archive, so it protects you from a damaged download. - It unpacks the archive into a staging folder. This uses
tarwith xz support on Linux and macOS, andExpand-Archiveof PowerShell on Windows. - It runs
actus --versionfrom the unpacked folder. If that fails, it stops. - It moves the folder to
toolchains/actus-<version>-<system>and pointscurrentat it.
A notification shows the progress and has a Cancel button.
The install folder is the same as the one of the install script, so the script
and the extension share one toolchain. It is the folder in ACTUS_HOME, or
%LOCALAPPDATA%\Actus on Windows, or ~/.actus:
| Item | Linux and macOS | Windows |
|---|---|---|
| Each version | ~/.actus/toolchains/<archive name> | %LOCALAPPDATA%\Actus\toolchains\<archive name> |
| Current version | ~/.actus/current (a link) | %LOCALAPPDATA%\Actus\current (a junction) |
If the folder of the version is already there, it is replaced. If the
installation fails, a message shows the reason and the button Manual
Install. The button offers the command of the install script for your system
and a link to actus-lang.org.
The extension does not change your shell profile or your user Path. It only
puts the folder of the compiler in front of PATH in the integrated terminals
of VS Code, which is what
actus.toolchain.addToTerminalPath
controls. A terminal that is already open keeps the old PATH; open a new one.
Install or update by hand
Two commands in the Command Palette work without the setting:
- Actus: Install / Update Toolchain installs the version of
actus.toolchain.versionnow, whateveractus.toolchain.autoDownloadsays. When it is done, the language server restarts. - Actus: Check Toolchain Version compares the compiler that the extension found with the newest release. If a newer one exists, a message offers Update Now. If no compiler is found, it offers Install Actus.
The extension looks for a newer release only when you run Check Toolchain Version, or choose Check / Update Actus Toolchain in the Quick Actions. It does not check in the background.
Check that it works
Open a .act file. In the status bar, at the left, you see an item like this:
The first part is the Actus icon when the server is ready, a spinning icon while it starts and a warning icon when it is not available. The version comes from the server. Hover over the item to see the state and the detail. Click it to open the Quick Actions.
The Actus icon in the Activity Bar has a view called Language Server. It
lists four lines: State (starting, ready or unavailable), Target, Compiler
(the path that is used) and Detail. When it is ready, the detail is
Compiler-backed features are available.
The Output panel has a channel called Actus Language Server. It shows the
command that was started, for example starting /home/you/.actus/current/bin/actus lsp for host, and what
the server writes to its standard error. Look there first when something does
not work.
Changing any actus.* setting, the workspace folders or the trust of the
workspace restarts the server. Restart Actus Language Server in the Quick
Actions does it by hand.
What you learned
- The extension adds an installer, the ownership panel, tests, tasks and a status bar to the language server of the compiler.
- It installs from the Visual Studio Marketplace as
actus-lang.vscode-actus, or from a VSIX file. It needs a trusted workspace. - It looks for the compiler in a fixed order, and with the default setting it downloads, checks and installs it when it is missing.
- The installer uses the same folder as the install script.
Next: The ownership panel.