microsoft / microsoft/vscode-languageserver-node

Feature request: Expose the sync API to all client/server connections

Open
#1,209 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
TypeScript
Stars
1.8k
Forks
404
Avg merge
2d 8h
Merged PRs (30d)
14

Description

I'm implementing this feature here:
https://github.com/microsoft/vscode-wasm/blob/main/sync-api-client/README.md
in pylance.

And it seems to me that this could be a common feature for just about every language server that uses vscode-languageserver.

Maybe something that would be exposed through a new capability.

Then on the server side you could use the new sync methods.

protected async getFileSystem() {
        return this._connection.workspace.getSyncFileSystem();
}

private _readFile(filePath: string) {
     const fs = this.getFileSystem();
    const bytes = fs.readFile(filePath);
    return this._decoder.decode(bytes, 'utf-8');
}

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 with the sync-api-client/README.md example and the LSP 3.17 client_registerCapability specification. Trace how client/server connections and workspace methods are exposed in this TypeScript package, including getSyncFileSystem(). Done means the sync API is consistently available through the relevant capability and connection interfaces for supported clients and servers.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
api
Issue type
Feature
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.