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:
git clone https://github.com/elide-dev/zed elide-zedIn 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:
{
"languages": {
"Java": { "language_servers": ["elide", "!jdtls", "..."] }
}
}["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:
{
"lsp": {
"elide": {
"binary": { "path": "/opt/elide/bin/elide", "arguments": ["lsp"] }
}
}
}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:
[
{ "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 } }
]| 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:
elide run --debugger=dap app.pyTo make Elide the default debugger for a language’s gutter and new-process modal:
{ "languages": { "TypeScript": { "debuggers": ["Elide"] } } }Limits
- Java and Kotlin debugging (JDWP) isn’t offered: Zed debugs Java only through the Java extension.
Related
- IDE integration: what each editor gets.
- Other editors:
elide lspand DAP from Neovim, Helix and other clients. - Debugging: CDP, DAP and JDWP debuggers for every language.