Settings reference
Every actus.* setting of the VS Code extension with its type, default and effect, and the colours that the extension sets for the four roles.
The extension has six settings. Open them with File → Preferences →
Settings and search for actus, or write them in settings.json. The extension
reads them for the workspace folder of the active editor, or for the first
folder when no editor is open. When any actus.* setting changes, the language
server restarts.
| Setting | Type | Default |
|---|---|---|
actus.lsp.path | string | "actus" |
actus.target | string | "host" |
actus.profile | debug or release | "debug" |
actus.toolchain.autoDownload | auto, prompt or off | "auto" |
actus.toolchain.version | string | "latest" |
actus.toolchain.addToTerminalPath | boolean | true |
A settings.json with every setting at its default:
actus.lsp.path
The path to the compiler program. The default "actus" means: look for it, in
the order that
Overview and installation
gives. Any other value is used as it is, and it is the program that the
extension starts as the language server and that every command, task and test
runs.
If the file named by the setting does not exist, the extension writes a line to the Actus Language Server output channel and uses the search instead. If that finds nothing either, the compiler is not available, and the extension does not download one: the toolchain installer is for the default value only.
actus.target
The target triple that the language server uses to decide which declarations
are active. A declaration that is for another target is shown in grey italics
in the editor. The default "host" means the system that you work on.
The value is also in the status bar and in the Language Server view. The
Quick Actions menu offers host, x86_64-unknown-linux-gnu,
aarch64-apple-darwin, x86_64-pc-windows-msvc and thumbv7em-none-eabihf,
and lets you type another one.
The setting is sent to the server only. The commands, tasks and tests of the
extension do not pass a target to actus: they use the one in Actus.toml.
actus.profile
The build profile, debug or release. The extension shows it in the status
bar and sends it to the language server when it starts. Actus 0.3.0 does not
read it there, so it does not change what the server answers.
The extension passes it to actus as --profile <profile> in these places:
- the commands Actus: Build, Actus: Run and Actus: Test, and the buttons of the Actus Commands view for them;
- the tasks
actus: build,actus: runandactus: test, and your own tasks with the commandbuild,runortest; - the runs of the Test Explorer.
It does not pass it to check, fix, fmt or the other commands. A task that
already has --release or --profile in its args keeps its own and gets no
second flag. Quick Actions has an item that switches the profile and writes
this setting.
actus.toolchain.autoDownload
What to do when no compiler is found.
| Value | Effect |
|---|---|
auto | Download, check and install the compiler without asking. Default. |
prompt | Ask first, with the buttons Install Actus, Manual Install and Not Now. |
off | Do nothing. The status bar shows a warning and the Language Server view says the compiler was not found. |
Any other value counts as auto. The setting is only used at the start of the
language server, and only when actus.lsp.path has its default value. The
command Actus: Install / Update Toolchain installs whatever the value is.
See what the installer does.
actus.toolchain.version
The version that the installer downloads: "latest", which means the newest
release on GitHub, or an exact version such as "0.3.0". A leading v is
allowed. The setting is read when an install starts, by the automatic
installation and by Actus: Install / Update Toolchain. It does not change a
compiler that is already installed.
actus.toolchain.addToTerminalPath
When true, the extension puts the folder of the compiler that it found, such
as ~/.actus/current/bin, in front of PATH in the integrated terminals of VS
Code, so that you can type actus there. It only does so when the compiler has
an absolute path. When false, the extension removes what it added. The change
reaches terminals that you open afterwards.
The extension never changes your shell profile or your user Path. For that,
use the install script, as in Install.
Role colours
The extension also sets default colours for the four roles, for the syntax
colours and for the semantic tokens of the language server. They are bold, and
you can change them in your own settings with editor.tokenColorCustomizations
and editor.semanticTokenColorCustomizations.
| Role | Colour | Meaning in the model |
|---|---|---|
erg | #4ADE80 | the owner that acts |
abs | #60A5FA | a view: it only looks |
ins | #FACC15 | a loan: it comes back after the call |
dat | #F472B6 | a hand-over: the value is given away for good |
The semantic token types are ownership-erg, ownership-abs, ownership-ins
and ownership-dat. A declaration that is inactive for the target has the
modifier inactive-target, drawn in #808080 italics. The
ownership panel uses the same four
colours, and adds #94A3B8 for a release and #21F1A8 for the header of a
verb.
Other settings that matter
These are settings of VS Code, not of the extension:
- Trust. The extension does nothing in a workspace that is not trusted. See Overview and installation.
editor.formatOnSave. The language server offers formatting, so VS Code can use it when you format a document. Whether it formats when you save is decided by this setting, not by the extension.
Back to VS Code extension.