https://github.com/nextflow-io/language-server
The Nextflow language server
https://github.com/nextflow-io/language-server
language-server-protocol nextflow
Last synced: about 1 year ago
JSON representation
The Nextflow language server
- Host: GitHub
- URL: https://github.com/nextflow-io/language-server
- Owner: nextflow-io
- License: apache-2.0
- Created: 2024-05-13T14:33:57.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-04T03:10:36.000Z (about 1 year ago)
- Last Synced: 2025-04-04T04:20:03.298Z (about 1 year ago)
- Topics: language-server-protocol, nextflow
- Language: Java
- Homepage:
- Size: 1.61 MB
- Stars: 18
- Watchers: 4
- Forks: 0
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nextflow Language Server
The official [language server](https://microsoft.github.io/language-server-protocol/) for [Nextflow](https://nextflow.io/) scripts and config files.
The following language features are currently supported:
- code navigation (outline, go to definition, find references)
- completion
- diagnostics (errors, warnings)
- formatting
- hover hints
- rename
- semantic highlighting
- DAG preview for workflows
## Requirements
The language server requires Java 17 or later.
## Configuration
The language server exposes a set of configuration settings that can be controlled through the `workspace/didChangeConfiguration` event. See the [Nextflow VS Code extension](https://github.com/nextflow-io/vscode-language-nextflow/blob/master/package.json) for an example of how to set up these configuration settings with sensible defaults.
## Development
To build from the command line:
```sh
# clone Nextflow repository
git clone https://github.com/nextflow-io/nextflow ../nextflow
# build language server (with nf-lang module)
make
```
To run unit tests:
```sh
make test
```
To run the language server:
```sh
java -jar build/libs/language-server-all.jar
```
Protocol messages are exchanged using standard input/output.
## Releasing
The Nextflow language server follows the versioning scheme of Nextflow. For each stable release of Nextflow, there is a corresponding stable release of the language server. There is no correlation between patch releases of Nextflow and the language server -- they are patched independently of each other.
A separate branch is maintained for each stable release, starting with `STABLE-24.10.x`. The `main` branch corresponds to the upcoming stable release. Updates to `main` should be backported as needed to maintain a consistent user experience, for example, when a new configuration option is added.
To make a new release of the language server:
1. Build the language server locally.
2. Create a new GitHub release with the language server JAR and a list of notable changes.
## Troubleshooting
Sometimes the language server might crash or get out of sync with your workspace. If this happens, you can restart the server from the command palette. You can also view the server logs from the "Output" tab under "Nextflow Language Server".
When reporting an issue, please include a minimal code snippet that triggers the issue as well as any error traces from the server logs.
## Credits
Based on [GroovyLanguageServer/groovy-language-server](https://github.com/GroovyLanguageServer/groovy-language-server).