VS Code Aster
Getting started

code_aster versions and catalogs

The language server reads the code_aster command catalog (the Cata/ package of code_aster) to know every command, keyword, type and allowed value. Which catalog it reads decides what completion, hover and diagnostics accept, so it should match the code_aster you run.

Which catalog is used

The first one available wins:

  1. vs-code-aster.asterCatalogPath, when it points to a folder that contains Cata/. A path without Cata/ is ignored.
  2. The cave-selected version: the version written in ~/.cave. Its catalog is extracted from the local Docker image simvia/code_aster:<version> (no download) into ~/.cache/vs-code-aster/catalogs/<version>/ and reused afterwards. A status bar message "Extracting code_aster catalog (<version>)…" shows while it runs.
  3. The bundled catalog, code_aster 16.7, shipped with the extension.

The language server restarts by itself when ~/.cave changes (for example after cave use in a terminal). At startup, cached catalogs of images that no longer exist are removed.

Show code_aster catalog info (Command Palette or the sidebar's Quick actions) shows the source, version, path and cache in use, with Show log (the code_aster: Catalog output channel) and Clear cache & restart LSP.

The version chip

While a .comm or .export editor is active, a chip on the right of the status bar shows the catalog in use:

  • <version>: the cave-selected version.
  • a library icon and <version> (or local): a catalog from asterCatalogPath.
  • a warning icon and (bundled) on a warning background: no cave version is selected, the bundled 16.7 catalog is used.

Click it to open the version picker.

Managing versions with cave

Select code_aster version (cave) (the chip, the Command Palette or the sidebar's Versions group) lists the installed versions, the current one marked "(current)".

  • Switch: pick a version. The extension runs cave use <version> and restarts the language server ("code_aster version set to X.").
  • Install a new version…: lists the versions available on DockerHub (from cave available), split into Installed and Available. Installing shows its progress (Starting, Pulling image, Downloading image, Extracting, Finalizing) and can be cancelled.
  • Remove: the trash button next to an installed version runs docker rmi after a confirmation. Removing the current version restarts the language server.

The sidebar's Versions group shows the same list, or explains what is missing: "cave not used" (with a native run alias), "cave is not installed" (click to run the setup) or "No code_aster image installed" (click to install).

The command family indicator

On the left of the status bar, an icon summarises how many of the five command families (Mesh, Material, Boundary Conditions & Loads, Analysis, Output) the active .comm uses. Its tooltip reads "code_aster: n/5 command families used. Click to browse commands." It shows a warning background when fewer than 3 families are used. Clicking it opens the command browser.

Last modified on