mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
923 B
923 B
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
