Skip to content

fix(server): correctly resolve workspace folder URI on Windows#76

Merged
blazejkustra merged 2 commits intomainfrom
fix/windows-workspace-folder-uri
May 3, 2026
Merged

fix(server): correctly resolve workspace folder URI on Windows#76
blazejkustra merged 2 commits intomainfrom
fix/windows-workspace-folder-uri

Conversation

@blazejkustra
Copy link
Copy Markdown
Owner

Summary

  • Use Node's fileURLToPath to convert the LSP workspace folder URI to a filesystem path, replacing the manual slice(7) that left URL-encoded characters in place and kept the leading slash on Windows drive paths.
  • Fixes Visual markers are not visible in v2+ in VSCode #68 — on Windows, file:///c%3A/repos/... was being turned into /c%3A/repos/..., so path.join(workspaceFolder, "node_modules/babel-plugin-react-compiler") produced \c%3A\repos\...\node_modules\babel-plugin-react-compiler and the require failed.
  • macOS/Linux behavior is unchanged for plain paths, and now correctly handles paths containing encoded characters (e.g. spaces).

Test plan

  • Verify on Windows that the babel plugin loads and inlay hints appear (couldn't test locally — no Windows machine).
  • macOS: extension still activates, plugin loads, hints work.
  • tsc --noEmit passes in packages/server.

Use Node's fileURLToPath to convert the LSP workspace folder URI to a
filesystem path, replacing the manual slice(7) that left URL-encoded
characters in place and kept the leading slash on Windows drive paths.

Fixes #68.
@blazejkustra blazejkustra merged commit 16c4dc8 into main May 3, 2026
3 checks passed
@blazejkustra blazejkustra deleted the fix/windows-workspace-folder-uri branch May 3, 2026 09:51
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.

Visual markers are not visible in v2+ in VSCode

1 participant