lsp-custom-requests

Installation
SKILL.md

LSP Custom Requests — URI Wire Format

Why it breaks

  • Connection.sendRequest(method, params) runs JSON.stringify(params).
  • vscode-uri Uri.toJSON() returns UriComponents (plain data). See microsoft/vscode-uri src/uri.ts.
  • Receiver gets a plain object — no prototype, no toString/fsPath.
  • uri.toString()"[object Object]"fs.stat/readFile fails with EntryNotFound.

Rules

  • Never call .toString() / .fsPath on a URI received over the wire without rehydrating first.
  • Type URI params as UriComponents (derived); revive on receive.

Pattern — UriComponents + revive

Params type derived from URI.toJSON:

Installs
1
GitHub Stars
1.0K
First Seen
Sep 2, 2026
lsp-custom-requests — forcedotcom/salesforcedx-vscode