microsoft / microsoft/vscode-languageserver-node

Option to control `workspaceFolders` in `InitializeParams`

Open
#1,470 1 comment 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

Sorry for opening an issue to ask questions.

We (Go extension) are using this client library to interact with the go language server. Currently the server assumes all workspace folders have file://-scheme. In vscode, however, that's not always true - some extensions register virtual file systems and their folders can be added as workspace folders. I hoped that we could use the WorkspaceFolderMiddleware. But, I suspect this is not used when populating the workspaceFolders property of the initializeParams.

The WorkspaceFolderFeature's fillInitalizeParam calls vscode.workspace.workspaceFolders directly.

https://github.com/microsoft/vscode-languageserver-node/blob/31fe8fea47fe4ae4e0494413826d33ee898a1ee0/client/src/common/workspaceFolder.ts#L56

Are there other paths that I can use to filter out non-file type folders when building the initialize request message?

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 client/src/common/workspaceFolder.ts at WorkspaceFolderFeature.fillInitalizeParam and inspect how WorkspaceFolderMiddleware is applied during initialization. Trace the construction of initializeParams and determine whether an option or hook can control workspaceFolders; done means non-file folders can be excluded or otherwise controlled in the initialize request.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.