ADITO Code Completion
ADITO Code Completion provides schema-aware completion for ADITO YAML files and JDito JavaScript/TypeScript processes in Visual Studio Code.
Features
YAML completion
- Suggests valid ADITO data-model names for schema fields marked with
MajorReference or MultipleMajorReference.
- Updates suggestions when YAML files are created, changed, renamed, or deleted.
- Uses the ADITO JSON-schema catalog configured for the workspace.
The extension includes YAML Language Support by Red Hat as an extension dependency for schema-driven YAML support. JDito completion remains available when the Red Hat YAML extension is disabled.
Process-file creation
For YAML files below a contexts/ directory, the extension recognizes safe local .js and .ts process paths. It also recognizes local .adoc documentation links in any YAML file. If a referenced file is missing, place the cursor on the value and choose Create Missing Linked File from the Quick Fix menu. The extension creates parent directories as needed, adds a type-appropriate TODO template, and opens the file. Ctrl/Cmd-clicking a reference also creates it, while keeping the YAML document open.
Only paths inside the YAML file's directory are accepted; absolute paths, URLs, unsupported extensions, and paths such as ../process.ts are rejected. To create a missing process file when a YAML completion inserts its reference, enable this workspace setting:
{
"aditoCodeCompletion.createProcessFileOnReferenceInsertion": true
}
To generate every missing supported reference in the YAML file when you save it instead, enable:
{
"aditoCodeCompletion.createProcessFileOnSave": true
}
JDito variable completion
The bundled TypeScript server plugin suggests JDito variables such as $sys, $local, and $this in linked JavaScript and TypeScript process files.
Suggestions are shown only when all of the following conditions apply:
- The JavaScript or TypeScript file is linked from a YAML file.
- The link is defined by a schema property containing JDito variable metadata.
- The cursor is inside a string literal.
For example, with the cursor inside the string, press Ctrl+Space:
import { vars } from "@aditosoftware/jdito-types";
vars.get("$sys.");
The completion replaces the content of the current string prefix, so selecting $sys.clientcountry results in:
vars.get("$sys.clientcountry");
The available variables depend on the YAML link and the corresponding schema metadata. This feature requires ADITO core version 2026.1.2 or later.
Currently, $local values are shown regardless of whether they are available on the server. The restriction of the $local values is planned for a future release.
JDito configuration-value completion
The TypeScript server plugin suggests values in the first argument of these methods:
project.getInstanceConfigValue("");
project.getPreferenceValue("");
Suggestions combine values from the ADITO schemas with custom properties found in:
preferences/preferences.yaml
preferences/_____PREFERENCES_PROJECT/_____PREFERENCES_PROJECT.aod
The plugin searches the TypeScript project directory and all open VS Code workspace folders, including multi-root workspaces. Changes to the supported preference files are picked up automatically.
The plugin works with both VS Code's bundled TypeScript version and a workspace TypeScript version. Do not add a separate JDito language-server plugin to tsconfig.json.
Requirements
- A trusted workspace. The extension is disabled in untrusted workspaces because it needs to read workspace files and schemas.
- ADITO core 2026.1.2 or later for JDito variable completion.
Getting started
- Install ADITO Code Completion in VS Code.
- Open an ADITO project as a workspace.
- Configure the ADITO schema catalog as described below.
- Open a supported YAML, JavaScript, or TypeScript file.
- Trigger completion with Ctrl+Space.
If the TypeScript server was already running when the extension or its configuration changed, run TypeScript: Restart TS Server from the Command Palette.
Configuration
Add the following setting to the workspace .vscode/settings.json:
{
"yaml.schemaStore.url": "https://releases.adito.cloud/2026/2026.1.2/schemas.json"
}
This catalog supplies the schema information used by YAML completion and by the YAML-to-JDito file-link index.
Supported locations are file: paths and HTTP(S) URLs. When an override is empty, the schema catalog configured by yaml.schemaStore.url is used.
| Setting |
Purpose |
yaml.schemaStore.url |
ADITO JSON-schema catalog used by YAML and JDito variable-link completion. |
aditoCodeCompletion.createProcessFileOnReferenceInsertion |
Creates a missing local JS/TS process file or .adoc file when its YAML reference is inserted. |
aditoCodeCompletion.createProcessFileOnSave |
Creates all missing local JS/TS process files or .adoc files referenced by a saved YAML file. |
Changes to these settings and supported custom preference files reload JDito suggestions automatically.
Troubleshooting
No JDito variable suggestions appear
- Confirm that the current JS/TS file is linked from a YAML file.
- Confirm that the link property exists in the configured schema and contains JDito variable metadata.
- Make sure the cursor is inside a quoted string.
- Check that the file belongs to the currently opened workspace.
- Run TypeScript: Restart TS Server.
No YAML suggestions appear
- Confirm that
yaml.schemaStore.url points to a reachable schema catalog.
- Check that the YAML filename matches one of the schema's file patterns.
- Ensure the Red Hat YAML extension is installed and enabled for YAML schema support.
Configuration-value suggestions are missing
- Use the first argument of
project.getPreferenceValue or project.getInstanceConfigValue.
- Verify that the relevant schema or preference file can be read from the TypeScript project or workspace folder.
- Restart the TypeScript server after changing workspace configuration.