Java support for Zed with a choice of two language servers:
- JDTLS (Eclipse), free and the default. This is exactly what the official Java extension does.
- IntelliJ, the engine behind JetBrains' "Java and Kotlin by IntelliJ IDEA". You get IntelliJ's completion, inspections, quick fixes, refactorings, Spring support and debugger inside Zed.
This is an unofficial fork of zed-extensions/java. Everything the official extension does still works.
Important
- This project is not affiliated with JetBrains or Zed Industries.
- The IntelliJ language server is proprietary JetBrains software. Using it needs an IntelliJ IDEA Ultimate subscription. A 30-day trial is available.
- The extension downloads the server directly from JetBrains. This repository does not contain or redistribute it.
- Zed is not an officially supported editor for the IntelliJ server.
Tested with Maven, Spring Boot 4.2 and JPA:
| ✅ | Completion with auto import (List (java.util)) |
| ✅ | Snippets: sout, fori, iter, psvm and more, and class, interface, record, enum in a new file |
| ✅ | Generate getters and setters, constructors (all fields, final fields, none), equals() and hashCode(), a builder, toString() from the code actions menu |
| ✅ | Javadoc: type /** above a method and get @param, @return and @throws |
| ✅ | IntelliJ inspections, quick fixes, rename, find references, formatting |
| ✅ | TODO, FIXME and XXX comments in the diagnostics panel, like with JDTLS |
| ✅ | Go to definition into the JDK and your dependencies (classes without sources open as a signature stub) |
| ✅ | Debugging main methods and single tests (also Spring Boot apps) |
| ✅ | Lombok: completion, diagnostics and navigation for generated members, without extra setup |
| ✅ | Spring: "Could not autowire" warnings, wrong Spring Data query methods |
| ✅ | JPQL completion inside @Query |
| ✅ | Spring Data method name completion (findByEmailAnd…) |
| ✅ | application.properties and application.yml: completion of Spring Boot keys, go to definition on a key (properties) |
| ✅ | Maven or Gradle import progress in the status bar |
| ✅ | pom.xml: completion of groupId, artifactId and version from your local Maven repository, and of ${...} properties |
The full list and the reasons are in docs/intellij.md.
- Zed 1.30 or newer (tested with 1.30.2)
- Rust, installed with rustup. Zed uses it to build the extension.
- Maven or Gradle for your projects. Check with
mvn -vorgradle -v. The IntelliJ server does not bring its own Maven. - A JDK for your projects
- About 3 GB of free disk space (server and indexes)
- An IntelliJ IDEA Ultimate license or trial
git clone https://github.com/NeikiDev/java.git zed-java-intellijIn Zed, open the command palette (cmd-shift-p on macOS, ctrl-shift-p on Linux and Windows), run zed: install dev extension and select the zed-java-intellij folder. The first build takes a minute.
This extension has the same id as the official Java extension, so it replaces it while installed. To go back, uninstall it and install "Java" from the extension store again.
The server is covered by the JetBrains User Agreement. By setting accept_eula in the next step, you accept it.
Open your Zed settings (zed: open settings) and add:
The YAML part is for application.yml. The XML part is for pom.xml and needs Zed's XML extension, see Maven pom.xml files. Leave it out if you do not want it.
Want IntelliJ only in some projects? Put the languages part into .zed/settings.json of those projects instead.
Open a Maven or Gradle project and a .java file. The first start downloads the server (about 390 MB) and indexes your project. You can watch the progress in the status bar.
After the download, open a terminal. First save the server path:
# macOS
IJ=$(echo ~/Library/Application\ Support/Zed/extensions/work/java/intellij/*/server/bin/intellij-server)
# Linux
IJ=$(echo ~/.local/share/zed/extensions/work/java/intellij/*/server/bin/intellij-server)Then pick one:
"$IJ" license login # sign in with your JetBrains account (if you have a subscription)
"$IJ" license trial # or start a free trialCheck it worked with "$IJ" license status. Then run editor: restart language server in Zed. Done!
Other ways (license file, company license server, Windows) are described in docs/intellij.md.
The IntelliJ server updates itself (checked at most once a day). The extension does not, because it is installed as a dev extension. To update it:
cd zed-java-intellij
git pullThen click Rebuild next to the extension in Zed's extensions panel (zed: extensions).
Everything goes under lsp.intellij.settings in your Zed settings. Only accept_eula is required. After changing a setting, run editor: restart language server.
General
| Setting | Example | What it does |
|---|---|---|
accept_eula |
true |
Accepts the JetBrains User Agreement shipped with the server, including versions installed by later updates. Without it the server does not start. |
data_sharing |
"none" |
What the server sends to JetBrains: "none" (default), "anonymous", "test" or "full". |
region |
"europe" |
Region for product terms and data processing: africa, americas, apac, china, europe, middle_east or oceania. |
jvm_args |
["-Xmx1g"] |
JVM options for the server, for example a lower or higher memory limit (default 2 GB). |
check_updates |
"always" |
When to look for a new server version: "always" (default, at most once a day), "once" or "never". |
system_path |
"/path/to/dir" |
Absolute path where the per-project server folders go. Default: your OS cache folder. |
todo_tags |
["TODO", "FIXME"] |
Comment tags shown as diagnostics (see TODO comments). Default: ["TODO", "FIXME", "XXX"]. [] turns them off. |
License (details in docs/intellij.md)
| Setting | Example | What it does |
|---|---|---|
license_file |
"~/idea.key" |
Use a license key file. While it is set, the server uses only this file. |
license_server |
"https://license.example" |
Company license server (floating licenses). |
ca_certificates |
["/path/ca.pem"] |
Extra CA certificates (PEM or DER), for a license server or TLS proxy with a private company CA. |
Project and editor
These use the same keys as the JetBrains VS Code extension.
| Setting | Example | What it does |
|---|---|---|
intellij.buildTool |
"gradle" |
Which build tool to import with when a project has both Maven and Gradle files. |
intellij.jdkForSymbolResolution |
"/path/to/jdk" |
The JDK the server resolves your code against, if it picks the wrong one. |
intellij.projects |
[] |
Externally configured projects. |
intellij.completion |
{ "caseSensitivity": "firstLetter" } |
How strictly completion matches upper and lower case. |
jetbrains.java.hints.types.local variable |
false |
Inlay hint for the type of var variables. |
jetbrains.java.hints.types.call chain |
false |
Inlay hints for the types in a chain of method calls. |
jetbrains.java.hints.settings.method parameter |
false |
Inlay hints for parameter names at call sites. |
jetbrains.java.settings.types.lambda parameter |
false |
Inlay hints for the types of lambda parameters. |
jetbrains.java.hints.collapse complex types |
false |
Shorten long generic types in inlay hints. |
The inlay hint settings are on by default and are read live. The other settings in this group are applied when the server starts.
Development
| Setting | Example | What it does |
|---|---|---|
lsp_proxy_path |
"/path/to/java-lsp-proxy" |
Use a locally built java-lsp-proxy instead of the downloaded one. |
intellij_server_path |
"/path/to/server-root" |
Use your own server installation instead of the managed download. Must be the folder that contains bin/intellij-server and EULA.txt. |
eula_hash |
"0123456789abcdef" |
Only with intellij_server_path: the first 16 hex digits of the SHA-256 of its EULA.txt (shasum -a 256 EULA.txt | cut -c1-16). |
All of them in one block:
"lsp": {
"intellij": {
"settings": {
// Required. `true` accepts the JetBrains User Agreement shipped with
// the server build in use, including builds installed by later updates.
"accept_eula": true,
// Privacy and region. Defaults: "none" and no region.
"data_sharing": "none", // "none" | "anonymous" | "test" | "full"
"region": "europe", // africa | americas | apac | china | europe | middle_east | oceania
// License (see "License" below).
"license_file": "/path/to/license.key", // INTELLIJ_SERVER_LICENSE_FILE
"license_server": "https://license.example", // JETBRAINS_LICENSE_SERVER (floating licenses)
// Extra CA certificates (PEM or DER) the server trusts, for example
// the private CA of a company license server or TLS proxy.
"ca_certificates": ["/path/to/company-ca.pem"],
// JVM options for the server itself.
"jvm_args": ["-Xmx4g"],
// Where the per-project server folders go. Default: your OS cache folder.
"system_path": "/path/to/intellij-system",
// Update checks for the server download: "always" (default, at most
// once a day) | "once" | "never".
"check_updates": "always",
// Comment tags shown as diagnostics. Default: ["TODO", "FIXME", "XXX"].
// [] turns them off.
"todo_tags": ["TODO", "FIXME", "XXX"],
// Use a locally built java-lsp-proxy instead of the downloaded one.
"lsp_proxy_path": "/path/to/java-lsp-proxy",
// Use your own server installation instead of the managed download.
// It must point at the folder that contains bin/intellij-server and EULA.txt.
"intellij_server_path": "/path/to/intellij-server-root",
// Only needed with intellij_server_path: the first 16 hex digits of
// the SHA-256 of its EULA.txt (shasum -a 256 EULA.txt | cut -c1-16).
"eula_hash": "…",
// Server settings, using the same keys as the VS Code extension.
// Applied when the server starts (restart it after changing them):
"intellij.buildTool": "gradle", // when both Maven and Gradle files exist
"intellij.jdkForSymbolResolution": "/path/to/jdk",
"intellij.projects": [], // externally configured projects
"intellij.completion": { "caseSensitivity": "firstLetter" },
// Read live:
"jetbrains.java.hints.types.local variable": false
}
}
}The server itself is turned on per language, not here: see step 4 for Java, Spring Boot properties files for .properties files and Maven pom.xml files for pom.xml.
The examples/ folder has three small projects with a checklist each:
examples/basic: plain Java with Maven, Gson and JUnitexamples/spring-boot: Spring Boot 4.2 with JPA, H2 and a REST controllerexamples/lombok: Lombok's@Data,@Value,@Builder,@Slf4jand more, see Lombok
All of them already switch to IntelliJ in their .zed/settings.json. Open one in Zed and follow its TESTING.md.
Ideas for what could come next. None of this is built yet. "Seen" means the server announces the feature (a bundled plugin, a command or a capability) but it has not been tried from Zed; "tried" means the command was called and returned useful data.
| Idea | What the server offers | Status |
|---|---|---|
Values and hover in application.properties |
Type, default value and the values set in the project for each key (intellij.spring.boot.configValues) |
Tried: no list of allowed values, so only booleans and existing values could be offered |
| Kotlin files | A Kotlin plugin and Kotlin debug support | Seen. The extension only attaches the server to Java and Properties |
More in pom.xml |
Nothing: the server answers every request in a pom.xml with an empty result |
Tried. Go to definition on a dependency and artifacts that are not in the local repository would have to be built in the proxy |
| Spring XML files | An XML plugin | Seen |
| Bazel projects | A Bazel plugin; the intellij_bazel debug adapter is already wired up |
Seen, never tested with a Bazel project |
| Run tests without the debugger, with results | Test discovery per file and module, used today only for the debug buttons | Tried for discovery. Zed has no test results view for extensions |
| Spring beans and endpoints | Lists of beans and HTTP endpoints with their locations (intellij.spring.beans, intellij.spring.endpoints) |
Tried. Needs a place in Zed to show them |
| Clickable stack traces | Commands that resolve a stack trace line to a file and line | Seen |
| IntelliJ tools for the AI agent | 23 tools (run configurations and more) reachable through the server | Tried: the list is returned. Would need a bridge to a Zed context server |
Want one of these, or something else? Open an issue. Features the server itself lacks are better requested from JetBrains.
| Problem | Fix |
|---|---|
Cannot run program "mvn", dependencies unknown |
Install Maven, then quit Zed completely and open it again |
Another language server already uses the instance directory |
Wait a few seconds, then editor: restart language server |
Asks you to set accept_eula |
Do step 3 and 4 |
| Starts, but nothing works | Activate your license (step 6) |
| High CPU or memory use | Normal for some minutes after opening a project (indexing). Set a memory limit with jvm_args, see Resource use |
Logs: dev: open language server logs → intellij. More help in docs/intellij.md. If you are still stuck, open an issue.
- docs/intellij.md: all IntelliJ settings, licensing, debugging, troubleshooting
- docs/jdtls.md: JDTLS mode, Gradle build files, formatters, debugger (upstream docs)
- docs/releasing.md: how to publish a release (maintainers)
The extension downloads a small helper program, java-lsp-proxy, from this repository's releases. To build it yourself (you need Rust):
cargo build --release -p java-lsp-proxyThen point the extension to it:
"lsp": { "intellij": { "settings": { "lsp_proxy_path": "/absolute/path/to/target/release/java-lsp-proxy" } } }| Download | Check |
|---|---|
java-lsp-proxy, gradle-lsp-bridge |
SHA-256 from release-checksums.json, recorded by the release workflow |
| IntelliJ server | Newest version over HTTPS. The version name is checked before it is used in a path or URL. |
| JDTLS, Lombok, JDK, java-debug, Java Test Runner, Gradle Language Server | Downloaded over HTTPS as in upstream, without a checksum |
A download that does not match its checksum is deleted and not started. Restarting the language server downloads it again. A path you set yourself (lsp_proxy_path, intellij_server_path and others) is used as it is.
This fork is based on zed-extensions/java v6.8.31 and adds:
- The opt-in
intellijlanguage server: download, license and privacy settings, configuration - IntelliJ debug adapters (
intellij_jvm,intellij_gradle,intellij_bazel) and gutter debugging of mains and tests - Proxy support for IntelliJ: library sources from
jar:links, stubs for classes without sources, hover links, a debug relay, key completion inapplication.properties, dependency completion inpom.xml, Spring Data method name completion, templates for new Java files, code actions that generate getters, setters, constructors,equals()andhashCode()(leaving out what Lombok writes), Javadoc completion after/** - Completion labels that show the package (
List (java.util)), with rarely wanted types (java.awt, JDK internals) sorted last - Native binaries downloaded from this repository's releases and checked against SHA-256 checksums
- This fork's IntelliJ support was written by NeikiDev together with Claude, Anthropic's AI model, which also reviewed and security-tested it
- zed-extensions/java and all its contributors, for the extension this fork is based on
- tartarughina, for the original IntelliJ integration this fork builds on
- iainh/intellij-lsp, for showing how to run the server outside VS Code
The code in this repository is licensed under the Apache License 2.0.
The IntelliJ language server is not part of this repository. It is governed by the JetBrains User Agreement. IntelliJ and IntelliJ IDEA are trademarks of JetBrains s.r.o.
{ "languages": { "Java": { "language_servers": ["intellij", "!jdtls", "..."], "debuggers": ["intellij_jvm"] }, "Properties": { "language_servers": ["intellij", "..."] }, "YAML": { "language_servers": ["intellij", "..."] }, "XML": { "language_servers": ["intellij", "..."] } }, "lsp": { "intellij": { "settings": { "accept_eula": true, "data_sharing": "none" } } } }