mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
- Update @vscode/test-electron due to some bugs - Update @vscode/test-cli for modern goodness - vscode-dts -> @vscode/dts off of the deprecated name - @types/node to 18 to match VS Code itself
Basic multi root API samples
This extension adds an entry to the status bar that shows the name of the currently active file. To exercise multi root APIs it:
- only enables itself when more than one
WorkspaceFolderis opened usingworkspace.workspaceFoldersAPI - shows the name of the
WorkspaceFolderthe file is from (if any) usingworkspace.getWorkspaceFolder()API - updates when there are changes to the number of
WorkspaceFoldervia theworkspace.onDidChangeWorkspaceFolders()API - registers a setting
multiRootSample.statusColorwith a scope ofresourceto configure a color perWorkspaceFolderto use for the status bar item
Running the example
- Open this example in VS Code
npm installnpm run compileF5to start debugging
