# Other editors

> Use Elide's Java language server, `elide lsp`, and its Debug Adapter Protocol server from Neovim, Helix or any LSP or DAP client: setup, root detection and the features each provides.

`elide lsp` is a Java language server on stdio. Any editor with an LSP client can use it; VS Code, IntelliJ IDEA
and Zed have their own integrations ([VS Code](https://elide.help/docs/vscode), [IntelliJ IDEA](https://elide.help/docs/intellij), [Zed](https://elide.help/docs/zed)).

## Java language server

```bash
elide lsp
```

Set it as the server command for the `java` language and start it from the project directory. Without a workspace
root from the client, the server uses the directory it was started in. Inside an Elide project it reads the
project's classpath, so dependencies resolve.

| Feature | LSP request |
| --- | --- |
| Diagnostics | `publishDiagnostics`, pull diagnostics |
| Completion, signature help | `completion`, `signatureHelp` |
| Hover, inlay hints | `hover`, `inlayHint` |
| Navigation | definition, declaration, type definition, implementation, references |
| Hierarchies | call and type hierarchy |
| Symbols | document and workspace symbols |
| Editing | rename, formatting, code actions, code lens |
| Display | semantic tokens, folding, selection ranges, highlights |

Formatting follows Google Java Format, as `elide javaformat` does.

### Neovim

Neovim 0.11 or later, in `init.lua`:

```lua
vim.lsp.config("elide", {
  cmd = { "elide", "lsp" },
  filetypes = { "java" },
  root_markers = { "elide.pkl" },
})
vim.lsp.enable("elide")
```

Opening a Java file under a directory with `elide.pkl` starts the server; `:checkhealth vim.lsp` lists the client.

### Helix

In `~/.config/helix/languages.toml`:

```toml
[language-server.elide]
command = "elide"
args = ["lsp"]

[[language]]
name = "java"
roots = ["elide.pkl"]
language-servers = ["elide"]
```

`hx --health java` shows `✓ elide` with the binary's path when `elide` is on `PATH`.

## Debug Adapter Protocol

Elide serves the Debug Adapter Protocol (DAP) for JavaScript, TypeScript and Python. Start the program with
`--debugger=dap`; Elide listens on `127.0.0.1:4711` and waits for a client to attach:

```bash
elide run --debugger=dap app.ts
elide test --debugger=dap app.test.ts
```

Point any DAP client at that address with an `attach` request; breakpoints, stepping, variables and the debug console
work as in other DAP adapters. `--debugger-port` and `--debugger-host` change the address. Java and Kotlin programs
use JDWP instead (see [Debugging](https://elide.help/docs/debugging)).

### Neovim (nvim-dap)

```lua
local dap = require("dap")
dap.adapters.elide = { type = "server", host = "127.0.0.1", port = 4711 }
for _, lang in ipairs({ "javascript", "typescript", "python" }) do
  dap.configurations[lang] = {
    { type = "elide", request = "attach", name = "Attach to Elide" },
  }
end
```

Run `elide run --debugger=dap` in a terminal, then `:DapContinue` and pick **Attach to Elide**.

## Coding agents

Agents in your editor connect to Elide over MCP: `elide mcp` for the project and `https://elide.help/mcp` for these
docs. See [Agentic engineering](https://elide.help/docs/agentic-engineering).
