Skip to content

fix: normalise missing names in workspaceFolder responses#156

Open
Sam-Sims wants to merge 1 commit into
nextflow-io:mainfrom
Sam-Sims:fix/zed-workspace
Open

fix: normalise missing names in workspaceFolder responses#156
Sam-Sims wants to merge 1 commit into
nextflow-io:mainfrom
Sam-Sims:fix/zed-workspace

Conversation

@Sam-Sims
Copy link
Copy Markdown

@Sam-Sims Sam-Sims commented May 14, 2026

Small PR that addresses the issue described in (#122 (comment))

workspaceFolder names are now normalised before use so that if they are empty, they are populated from the URI file name before use.

e.g

"workspaceFolders": [
  {
    "name": "",
    "uri": "file:///path/to/project/test"
  }
]

becomes

"workspaceFolders": [
  {
    "name": "test",
    "uri": "file:///path/to/project/test"
  }
]

This fixes Zed integration where certain workspace features were disabled as zed sends "" as workspace names.

While doing this I realised it may be better to rework workspaceFolder handling to teat URIs as workspace identifiers instead of names. My Java is a bit rusty though - so haven't attempted that here.

No worries if you'd prefer not to merge this in favour of a more robust fix, but it's working for me with Zed using a locally built langauge server, so will leave it up in case it's useful to anyone else in the meantime.

Takes the filename from the URI to use as the name if name is empty.
This fixes Zed integration where the name is set to "" causing
workspaces init to be skipped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant