fix: normalise missing names in workspaceFolder responses#156
Open
Sam-Sims wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
becomes
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.