Nextflow language support for Zed, using the official Nextflow Tree-sitter grammar and language server.
Inspired by other works - see credits.
- Java 17 or later (to run the language server)
- Rust when installing this as a dev extension
This extension is not yet published, but can be installed directly from the repository.
Clone it:
git clone https://github.com/Sam-Sims/nextflow-zed.gitThen in Zed:
- Open the Extensions page.
- Select
Install Dev Extension. - Select the cloned
nextflow-zeddirectory.
You can also open the command palette and run zed: install dev extension.
Zed will build and install the extension automatically. Open a .nf file to start it and the language server JAR will be downloaded on first use.
Configure the extension under the lsp key in your global Zed settings.json, or in a project's .zed/settings.json:
{
"lsp": {
"nextflow-language-server": {
"settings": {
"nextflow": {
"languageVersion": "26.04",
"java": {
"home": "/path/to/jdk-17-or-later"
},
"languageServer": {
"path": "/absolute/path/to/language-server-all.jar"
},
"errorReportingMode": "warnings",
"files": {
"exclude": [".git", ".lineage", ".nf-test", ".pixi", ".venv", "work"]
}
}
}
}
}
}- The extension includes the following language server defaults from the VS Code Nextflow extension configuration:
nextflow.completion.extended:falsenextflow.completion.maxItems:100nextflow.debug:falsenextflow.errorReportingMode:"warnings"nextflow.files.exclude:.git,.lineage,.nf-test,.pixi,.venvandworknextflow.formatting.harshilAlignment:falsenextflow.formatting.maheshForm:falsenextflow.formatting.sortDeclarations:false
- However settings defined in the zed
settings.jsonoverwrite the extension defaults. See Configuring Language Servers for details. - The
javaandlanguageServerentries are optional overrides. Without them, the extension finds Java throughJAVA_HOMEor yourPATHand automatically downloads the newest language server patch version for the selected Nextflow language version. - Supported language versions are
26.04,25.10,25.04and24.10. The default is26.04. Restart the language server after changing its version, Java installation or JAR.
This extension builds on the work of several existing language extensions that provided useful references and inspiration:
