Support virtual workspaces
👋 Hi there, Martin here, from the VS Code team.
Recently we've announced the Remote Repository feature that lets you browse and edit files and folders directly on GitHub.
Open Remote Repository... opens VSCode on a folder or workspace located on a virtual file system. We call this a virtual workspace. We observed that not all extension support this well, either because they can not, or they haven't thought about it.
It would be fantastic if you could test whether your extension can handle virtual workspaces:
Check out the Virtual Workspaces Extension Author Guide on how to do that.
When done, set the new virtualWorkspaces capability in your 'package.json'.
{
"capabilities": {
"virtualWorkspaces": true | false
}
}
- Use
"virtualWorkspaces": trueif your extension is prepared for virtual workspaces - Use
"virtualWorkspaces": falseif your extension should be disabled when a virtual workspace is opened
For questions and comments please use the Virtual Workspaces Tracking Issue.
Thanks for the support and the great work! ❤️
Hi @lszomoru, I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Here are some suggestions to add virtual-workspace support to your extension:
-
Follow the Virtual Workspaces Extension Author Guide: • https://github.com/microsoft/vscode/wiki/Virtual-Workspaces
-
Test in a virtual workspace by running Open Remote Repository… in VS Code, making sure your extension still activates and handles file operations.
-
In your package.json, declare the new capability:
{ "capabilities": { "virtualWorkspaces": true } } -
Use the VS Code FileSystem API (
vscode.workspace.fs) rather than Node’sfs, and avoid direct file-path assumptions. Check for URI schemes likevscode-remoteor GitHub’s VFS. -
See how the Java extension tracks this support: • https://github.com/redhat-developer/vscode-java/issues/1936
Other references with low confidence
-
vscode-spring-initializr: identical request to declare
virtualWorkspacesin package.json • https://github.com/microsoft/vscode-spring-initializr/issues/185 -
vscode-spring-boot-dashboard: same feature ask • https://github.com/microsoft/vscode-spring-boot-dashboard/issues/132
-
vscode-maven: request for virtual workspace capability • https://github.com/microsoft/vscode-maven/issues/627
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!