Skip to content

Zed extension

The Elide extension for Zed: elide lsp as a Java language server, an Elide debug adapter for JavaScript, TypeScript and Python, and debugging from Zed tasks.

Read offlineelide help zed

On this page

The Elide extension for Zed adds elide lsp as a Java language server and an Elide debug adapter for JavaScript, TypeScript and Python. Any Zed task that runs elide run or elide test also shows up in the debugger’s Debug tab.

Requirements

Requirement Why
Elide 1.6.0 or newer on PATH The extension runs elide; set another path in settings.
Zed’s Java extension It defines the Java language.
The Pkl extension Highlights elide.pkl. Optional.
elide setup python Only to debug Python.

Install

Install it as a dev extension, which needs Rust through rustup:

Terminal
bash
git clone https://github.com/elide-dev/zed elide-zed

In Zed, open Extensions, choose Install Dev Extension and select the elide-zed directory.

Java language server

Name elide in the Java language_servers list of settings.json. To use it instead of jdtls:

json
{
  "languages": {
    "Java": { "language_servers": ["elide", "!jdtls", "..."] }
  }
}
utf-8 · json · Lines: 5

["elide", "jdtls"] keeps both; ["!elide", "..."] turns Elide off. The server reads the workspace root Zed sends, and an elide.pkl there makes it an Elide project, so dependencies resolve. It provides diagnostics, completion, hover, navigation, rename, formatting, code actions, inlay hints and semantic tokens; see Other editors for the full list.

To run a specific binary or pass extra flags:

json
{
  "lsp": {
    "elide": {
      "binary": { "path": "/opt/elide/bin/elide", "arguments": ["lsp"] }
    }
  }
}
utf-8 · json · Lines: 7

arguments replaces the default ["lsp"].

Debugging

Open the debugger with debugger: start (F4) and pick a scenario from .zed/debug.json, a task from the Debug tab, or Launch with the Elide adapter. launch starts elide run --debugger=dap (or elide test with "command": "test") and connects; attach connects to a program already listening:

json
[
  { "label": "Debug app.ts", "adapter": "Elide", "request": "launch", "program": "app.ts" },
  { "label": "Debug this file", "adapter": "Elide", "request": "launch", "program": "$ZED_FILE" },
  { "label": "Debug tests", "adapter": "Elide", "request": "launch", "command": "test", "args": ["app.test.ts"] },
  { "label": "Attach", "adapter": "Elide", "request": "attach", "tcp_connection": { "host": "127.0.0.1", "port": 4711 } }
]
utf-8 · json · Lines: 6
Launch field Meaning
program File to run, relative to cwd.
args Arguments after program.
cwd Working directory; defaults to the worktree root.
env Extra environment variables.
command run (default) or test.
elideArgs Elide flags before program, such as ["--max-mem=512m"].
host, port DAP listener; defaults to 127.0.0.1 and a free port (4711 to attach).

Program output appears in the debug console. To attach, start the program yourself:

Terminal
bash
elide run --debugger=dap app.py

To make Elide the default debugger for a language’s gutter and new-process modal:

json
{ "languages": { "TypeScript": { "debuggers": ["Elide"] } } }
utf-8 · json · Lines: 1

Limits

  • Java and Kotlin debugging (JDWP) isn’t offered: Zed debugs Java only through the Java extension.

Was this page helpful?