Skip to content

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.

Read offlineelide help connect-ide

On this page

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, IntelliJ IDEA, Zed).

Java language server

Terminal
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.

For projects with elide.pkl, indexing uses the same resolved source sets as the build, including declared patterns, conventional layouts, and workspace members. Source-set names, types (source, test, example, other), and dependencies are available to clients in capabilities.experimental.elideSourceSets. An empty source selection stays empty; unrelated repository files are not indexed. Projects without an Elide manifest use directory discovery with cache directories excluded.

Changes to elide.pkl refresh the index, and creating a source directory updates the inferred layout. Restart the server after changing imported manifest helpers, or to refresh the source-set metadata returned at initialization. Source-set classification does not separate the compiler’s shared dependency classpath.

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.

Definition opens project sources, a dependency’s -sources.jar when elide install fetched one, and JDK classes in the lib/src.zip of the JDK that JAVA_HOME names. Elide does not ship src.zip; without such a JDK, definition on a JDK class, or on a class whose library has no sources, returns no location.

The classpath is the one elide install writes under .dev/dependencies/m2/; run it once before starting the server, and again after changing dependencies. In an Android project it also includes the compileSdk platform’s android.jar, the classes of each .aar dependency, and the generated R class, so android.*, androidx.* and R.string.* resolve; definition on an R field opens the generated R.java, and framework types open the platform’s sources when the SDK has them installed. After adding a resource, run elide build and restart the server. See Editors and agents.

The server keeps one classpath for every Java file in the project: the union of main, test and, in an Android project, androidTest. An import that only a test scope provides therefore resolves in src/main too; elide build still reports it.

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")
utf-8 · lua · Lines: 6

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"]
utf-8 · toml · Lines: 8

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:

Terminal
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).

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
utf-8 · lua · Lines: 7

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.

Was this page helpful?