# Configuration

All settings live under `vs-code-aster.*`. Open them with `File > Preferences > Settings` (`Ctrl+,` / `Cmd+,`) and search for `VS Code Aster`, or click a setting in the **Settings** group of the [code_aster sidebar](/sidebar#settings).

The ones you are most likely to change:

- `vs-code-aster.pythonExecutablePath`: the Python that runs the language server and the formatter. Left at `python3`, the extension finds a Python 3.10 or later by itself (see [Installation](/installation#how-the-interpreter-is-chosen)).
- `vs-code-aster.aliasForRun`: the command the **Run** button calls with the `.export` file. Any value that does not start with `cave` is treated as a native install.
- `vs-code-aster.asterCatalogPath`: the `code_aster` package of a local install (the folder that contains `Cata/`), to read its catalog instead of the cave image or the bundled one. A path without `Cata/` is ignored.
- `vs-code-aster.medFileExtensions`: extensions opened in the mesh viewer. The list is kept in sync with `files.associations`.

## Settings the extension writes for you

Some actions save a setting in your **user** settings:

| Action | Setting |
| --- | --- |
| Locate code_aster install (native, without cave) | `aliasForRun`, `asterCatalogPath` |
| Open as MED mesh, or adding a MED extension | `medFileExtensions`, and `files.associations` |
| Auto comments checkbox of the export form | `exportAutoComments` |
| Viewer settings popup | `viewer.*` |

The extension also turns off word-based suggestions for the `comm` language (`editor.wordBasedSuggestions`), so completions come only from the catalog.

## All settings

| Setting | Default | Description |
| --- | --- | --- |
| `vs-code-aster.commFileExtensions` | `[".comm",".com",".com0",".com1",".com2",".com3",".com4",".com5",".com6",".com7",".com8",".com9"]` | Specifies the file extensions to be recognized as Code Aster command files. Default includes `.comm`, `.com`, and `.com0`-`.com9`. You can customize this list as needed. |
| `vs-code-aster.medFileExtensions` | `[".med",".mmed",".rmed"]` | Specifies the file extensions to be recognized as MED mesh/result files. code_aster may also write MED data under numeric extensions matching the I/O unit (e.g. `.21`, `.71`). Add such extensions here to apply the MED icon and language association. Extensions listed here are automatically written to `files.associations`. |
| `vs-code-aster.aliasForRun` | `"cave run"` | Command that launches a study. The **Run** button executes `<alias> file.export` in a terminal opened in the `.export` folder. Examples: `cave run` (default: Docker image managed by cave), `run_aster` (native install whose `bin/` is on PATH), `/opt/aster/bin/run_aster` or `%LOCALAPPDATA%\code_aster\bin\run_aster.bat` (full path to the launcher; with the Windows installer use the `bin\run_aster.bat` at the install root, it sets up the environment). Run **Locate code_aster install** from the Command Palette to fill this automatically from an install folder. |
| `vs-code-aster.pythonExecutablePath` | `"python3"` | Python executable that runs the language server (3.10 or later; its libraries ship with the extension, nothing to install). Leave `python3` to let the extension find one: the `py` launcher on Windows, then `python3` and `python`. |
| `vs-code-aster.formatter` | `"ruff"` | Formatter for `.comm` files. Use `ruff` (default) to format via `python -m ruff format` using the interpreter at ``vs-code-aster.pythonExecutablePath``, `off` to disable formatting, or any custom shell command (e.g. `black - -q`) that reads source on stdin and writes the formatted result to stdout. |
| `vs-code-aster.exportAutoComments` | `true` | Insert the "generated by VS Code Aster" header and the section comments (`# Simulation parameters`, `# Input files`, `# Output files`) when saving or formatting `.export` files. When disabled, these comments are removed; your own comments are kept. |
| `vs-code-aster.asterCatalogPath` | `""` | Optional path to the `code_aster` Python package of a local install: the directory that contains `Cata/`, typically `<install>/lib/aster/code_aster` on Linux or `%LOCALAPPDATA%\code_aster\codeaster-dist\lib\aster\code_aster` with the Windows installer. The language server reads completions, signatures and diagnostics from it. When empty, the extension auto-detects the cave-selected version and extracts the catalog from the corresponding Docker image; if that fails, it falls back to the bundled catalog. Run **Locate code_aster install** from the Command Palette to fill this automatically from an install folder. |
| `vs-code-aster.maxRunLogs` | `10` | Number of run logs to keep per project in `.vs-code-aster/run_logs/`. Older logs are deleted when a new run starts. |
| `vs-code-aster.viewer.hiddenObjectOpacity` | `0` | Opacity of objects hidden via the eye button in the mesh viewer (0 = fully invisible, 0.5 = 50% visible as a ghost). |
| `vs-code-aster.viewer.edgeThresholdMultiplier` | `1` | Sensitivity of the threshold-based mesh edge display (see ``vs-code-aster.viewer.edgeMode``). Higher values reveal mesh edges from farther away. |
| `vs-code-aster.viewer.edgeMode` | `"threshold"` | Controls how the wireframe edges drawn on each cell of the mesh are displayed in the viewer. Does not affect edge groups (1D named entities from the .med file — see ``vs-code-aster.viewer.edgeGroupThickness``). |
| `vs-code-aster.viewer.groupTransparency` | `0.2` | Opacity of the parent mesh when a sub-group is highlighted (0 = invisible, 0.5 = semi-visible). |
| `vs-code-aster.viewer.edgeGroupThickness` | `3` | Line width (in pixels) used to render edge groups (1D named entities from the .med file) in the mesh viewer. Independent from the wireframe edges drawn on mesh cells (see ``vs-code-aster.viewer.edgeMode``). |
| `vs-code-aster.viewer.edgeGroupDepthOffset` | `true` | Render edge groups above the mesh surface to avoid z-fighting (flickering lines). Disable if edge groups appear offset from their true position. |
| `vs-code-aster.viewer.nodeGroupSize` | `1` | Multiplier applied to the size of node-group points in the mesh viewer. Points still scale with zoom; this controls their base size. |
| `vs-code-aster.viewer.sidebarSort` | `"natural"` | Order used for groups in the mesh viewer sidebar. |
| `vs-code-aster.viewer.groupByKind` | `true` | Bucket groups by kind in the mesh viewer sidebar (volumes, then faces, then edges, then nodes). When disabled, all groups of an object are shown in a single list sorted by ``vs-code-aster.viewer.sidebarSort``. |
| `vs-code-aster.viewer.groupArrowKeys` | `true` | In the mesh viewer, after clicking a group, the Up and Down arrow keys highlight the previous or next group of the sidebar instead. |
| `vs-code-aster.viewer.showOrientationWidget` | `true` | Show the orientation axes widget in the bottom-right corner of the viewer. |
| `vs-code-aster.viewer.showFps` | `false` | Show the frame rate (frames drawn per second) under the element counter of the mesh viewer. The view is only redrawn while it changes, so it reads idle otherwise. |
| `vs-code-aster.viewer.showBoundingBox` | `false` | Show a bounding box with X/Y/Z tick marks and values around the loaded meshes in the viewer. |
| `vs-code-aster.viewer.showWireframe` | `false` | Render meshes in wireframe mode instead of solid surfaces. |
| `vs-code-aster.viewer.dreamBackground` | `false` | Cosmetic animated EDF orange and blue light blobs slowly breathing behind the mesh. Purely decorative — does not affect mesh lighting. |
| `vs-code-aster.viewer.autoRotate` | `false` | Automatically rotate the view around the current vertical axis like a turntable. |
| `vs-code-aster.viewer.autoRotateSpeed` | `15` | Default auto-rotation speed in degrees per second (between `5` and `180`). Transient overrides from the toolbar popover are not persisted. |
| `vs-code-aster.viewer.autoRotateReverse` | `false` | Default auto-rotation direction. When enabled, the view rotates the opposite way by default. Transient overrides from the toolbar popover are not persisted. |
| `vs-code-aster.enableTelemetry` | `true` | Enable sending anonymous telemetry. Un-check to opt out of telemetry collection. |

