Add Nextflow language server support (#1815)

The Nextflow language server schedules a debounced (1s) AST update on every
didOpen/didChange, and LanguageService.references is the only request that does
not await it -- documentSymbol, codeLens, documentLink and semanticTokensFull
all do. A references request issued inside that window races the recompile of
the file it asks about and can return an empty list, which is what the macOS CI
runner hit. Send a documentSymbol request for the same file first, which blocks
server-side until the pending update has been applied.

Also compare reference paths using the platform separator in the tests, since
relativePath is OS-native and the hardcoded forward slashes failed on Windows.
This commit is contained in:
Evangelos Karatzas authored and GitHub committed 2026-08-08 18:58:46 +02:00
1 parent 27d7d0e0ec
commit 76b94f3274
17 files changed
+529 -9

No files matched your search

@@ -0,0 +1,3 @@
work/
.nextflow/
.nextflow.log*
@@ -0,0 +1,23 @@
#!/usr/bin/env nextflow
include { GREET; SHOUT } from './modules/greet/main.nf'
include { buildGreeting } from './modules/util/main.nf'
params.names = ['Ada', 'Grace']
workflow SAY_HELLO {
take:
names
main:
greetings = GREET(names)
shouted = SHOUT(greetings)
emit:
shouted
}
workflow {
log.info buildGreeting('World')
SAY_HELLO(Channel.fromList(params.names))
}
@@ -0,0 +1,27 @@
process GREET {
tag "$name"
input:
val name
output:
path "greeting.txt"
script:
"""
echo "Hello, ${name}!" > greeting.txt
"""
}
process SHOUT {
input:
path greeting
output:
path "shout.txt"
script:
"""
tr '[:lower:]' '[:upper:]' < ${greeting} > shout.txt
"""
}
@@ -0,0 +1,7 @@
def normalizeName(String name) {
return name.trim().toLowerCase()
}
def buildGreeting(String name) {
return "Hello, " + normalizeName(name)
}
@@ -0,0 +1,8 @@
manifest {
name = 'serena-nextflow-test-repo'
description = 'Minimal Nextflow pipeline used by the solidlsp Nextflow language server tests'
}
process {
cpus = 1
}