Skip to content

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

Open
@rchiodo

Description

@rchiodo

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');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest for new features or functionality

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions