microsoft / microsoft/language-server-protocol

Define/document the ways in which clients may/may not change custom-scheme URIs provided by the server

Open
#1,879 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

document synchronization feature-request
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

If an LSP server sends a URI like "my-foo:///C:/foo/bar" to VS Code, it will come back as "my-foo:/c%3A/foo/bar". In particular:

  • the // before the authority have been removed (because the authority is empty)
  • the first character of the path has been lowercased (because despite not being a file URI, VS Code's URI class has decided it is a drive letter and normalises to lowercase drive letters)

To ensure LSP clients and servers are all on the same page, it would be beneficial to document the kinds of changes client/servers are allowed to make to custom scheme URIs. In particular, the change of casing for non-file URIs seemed unexpected to me and it would be very easy for a server to that's not being tested with VS Code specifically to not handle this correctly.

(I did raise this with VS Code in the hope it was a bug, but it's apparently by design: https://github.com/microsoft/vscode/issues/202071)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the URI example in the issue and the linked VS Code behavior report. Document which transformations clients and servers may or may not apply to custom-scheme URIs, including authority slashes, path casing, and percent encoding; done means the LSP guidance resolves these interoperability questions.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.