VS Code extension for Nextflow that provides language support for scripts and config files, using the Nextflow language server.
Read the blog posts (part 1, part 2) and the docs for more information.
See also:
The extension uses the Nextflow langauge server to provide code intelligence:
- Syntax highlighting
- Code navigation (outline, go to definition, find references)
- Code completion
- Diagnostics (errors, warnings)
- Formatting
- Hover hints
- Rename
- DAG preview for workflows
The extension includes a GitHub Copilot extension specifically trained for Nextflow development:
- Full support for Nextflow DSL2 syntax
- Context-aware assistance that understands your specific codebase
- Generates code following Nextflow best practices and patterns
- Works with any LLM you have access to (e.g. OpenAI, Anthropic, Google) through Github Copilot (Sonnet 3.5 is recommended by the Seqera team)
- Special commands:
/dsl2
- Convert DSL1 scripts to DSL2/nf-test
- Assists in generating nf-test test cases and improving test coverage
The language server requires Java 17 or later.
Clone this repository:
git clone https://github.com/nextflow-io/vscode-language-nextflow
cd vscode-language-nextflow
If you need to edit the language server, clone the repository and build it:
git clone https://github.com/nextflow-io/language-server
make server
Finally, press F5
to build the extension and launch a new VS Code window with the extension loaded.
You will be prompted to enter a path to your Nextflow workspace, which defaults to ../test-workspace
relative to the project directory.
- Update the extension version number in
package.json
. - Update the changelog in
CHANGELOG.md
. - Run the "Publish Extension" action to publish the extension to the VSCode marketplace and Open VSX.
Contributions are welcome. Feel free to fork this repository and open a pull request to propose changes.
- https://manual.macromates.com/en/language_grammars
- https://code.visualstudio.com/docs/extensions/publish-extension
- https://code.visualstudio.com/docs/extensions/yocode
- https://code.visualstudio.com/docs/extensionAPI/extension-manifest
Enjoy!