# Editor setup

> Install the Alice extension in VS Code, VSCodium, Open VSX clients, or Zed and configure the language server.

Canonical: https://alice-lang.org/documentation/tools/editors/

[Documentation index](https://alice-lang.org/documentation/llms.txt) · [Complete book](https://alice-lang.org/llms-full.txt)

## Install the language tools

Install Alice first and verify `alice version`. Alice 0.11.1 and later include `alice lsp --stdio`. The editor extension launches that server, so `alice` must be on the editor process's PATH, or its executable path must be configured.

## VS Code

Install **Alice Language** by JuliaKlee from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=JuliaKlee.alice-language).

You can also install it from a terminal:

```sh
code --install-extension JuliaKlee.alice-language
```

Open a folder containing `alice.toml` and an `.al` file. Use an Alice source file for language features, and edit dependencies in the manifest. If Alice was installed after the editor started, restart the editor so it sees the updated PATH.

## VSCodium and Open VSX

The same extension is available from [Open VSX](https://open-vsx.org/extension/JuliaKlee/alice-language). Use the extension browser in VSCodium or another Open VSX client, or install the platform-specific VSIX from the [extensions repository](https://github.com/alicelanguage/extensions).

Choose an artifact for your operating system and architecture. In VS Code/VSCodium, **Extensions: Install from VSIX…** installs a downloaded package. The native adapter must match the host platform.

## What the extension provides

- Alice syntax highlighting, snippets, and formatting.
- Diagnostics, completion, hover, signatures, definitions, and symbols.
- .NET members and XML documentation from reference assemblies.
- Automatic `using` edits where supported.
- NuGet ID and stable-version completion in `alice.toml` dependencies and `.alproj` package references.

Source checking uses open buffers in preference to their saved contents. The server reads assembly metadata without keeping dependency DLLs locked. Build C# project dependencies to make their APIs and adjacent XML documentation available.

## Settings

| Setting                 | Effect                                            |
| ----------------------- | ------------------------------------------------- |
| `alice.debounceMs`      | Delay before checking edits; default is 180 ms    |
| `alice.deepChecks`      | Control generated-C# checking on open/save        |
| `alice.nugetCompletion` | Enable or disable network-backed NuGet completion |

For fully offline editing, disable NuGet completion. Successful lookup results are cached for ten minutes and requests time out after two seconds. Changing editor completion settings does not restore missing project dependencies; run `alice install` or build.

## Zed and other LSP clients

The extensions repository includes a Rust/WASI Zed adapter. Use its documented package/install workflow. A generic LSP client can launch:

```sh
alice lsp --stdio
```

Pass `debounceMs`, `deepChecks`, and `nugetCompletion` without the `alice.` prefix in `initializationOptions`. The server uses stdout for framed protocol messages and stderr for errors; do not insert a wrapper that writes banners to stdout.

## Troubleshooting

| Symptom                                   | Action                                                                                            |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Server does not start                     | Run `alice version` and `alice doctor` in a terminal; verify the editor sees the same executable. |
| External types are missing                | Run `alice install`, build project references, and check namespace imports.                       |
| Package edits have no effect              | Edit `alice.toml` and restore/build; generated `.alproj` files are disposable.                    |
| NuGet suggestions are absent              | Check `alice.nugetCompletion`, network access, and the manifest position.                         |
| One compiler works but the editor differs | Check `alice toolchain show` in the project and the editor's executable configuration.            |

For an editor bug, include the Alice version, extension version, platform, and a small `.al` reproduction in the [issue report](https://github.com/alicelanguage/extensions/issues).

## Continue reading

- Previous: [Write secure Alice applications](https://alice-lang.org/documentation/advanced/security.md)
- Next: [CLI command reference](https://alice-lang.org/documentation/tools/cli.md)
