Java language support with EclipseJDTLS for Zed.
To configure the LSP options, you can utilize the same fields provided by VSCode's Java support documentation. These fields are documented in detail and cover a wide range of customization options. Follow these steps to configure your LSP:
-
Open the Zed Configuration File: Open configuration file for Zed (
CMD + ,
). Edit the configuration to include your desired LSP options. -
Set Custom Options: Add the relevant fields in the configuration file to match the options provided in the VSCode Java support documentation.
{
"lsp": {
"java": {
"java.jdt.ls.lombokSupport.enabled:": true
}
}
}
If you have a custom JDTLS binary that you would like to use with the Zed extension, follow these steps:
-
Locate the JDTLS Binary: By default, the Zed extension uses the JDTLS binary located at:
- Linux:
~/.local/share/zed/extensions/work/java-eclipse-jdtls/eclipse.jdt.ls/bin/jdtls
- macOS:
~/Library/Application Support/Zed/extensions/work/java-eclipse-jdtls/eclipse.jdt.ls/bin/jdtls
- Windows:
%APPDATA%/Zed/extensions/work/java-eclipse-jdtls/eclipse.jdt.ls/bin/jdtls
- Linux:
-
Create a Symlink: Symlink the default JDTLS binary path to your custom JDTLS binary. This ensures that when Zed starts the JDTLS, it will use your custom version.
Example for Linux:
ln -s /path/to/your/custom/jdtls ~/.local/share/zed/extensions/work/java-eclipse-jdtls/eclipse.jdt.ls/bin/jdtls