Open hyangah opened 2 months ago
The only way I can currently think of is subclassing the client and overriding fillInitializeParams
and patching the workspace folders there. This being said, subclassing is generally not recommended and this might break in future versions.
The correct way would be to provide a hook via the client options.
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 theworkspaceFolders
property of theinitializeParams
.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?