Files
vscode-extension-samples/basic-multi-root-sample
Matt Bierner 5d3686b7dc Bump old vscode versions
This bumps the `@types/vscode` and `engines: vscode` on packages that were using very old versions. These old versions used a `vscode.d.ts` that didn't include proper link support. We've also made a number of fixes and improvements to `vscode.d.ts` that are useful to extension authors
2023-01-30 21:11:11 -08:00
..
2020-05-29 14:20:07 -07:00
2022-11-04 14:27:02 -07:00
2020-05-29 14:13:32 -07:00
2019-04-18 10:09:12 +02:00
2023-01-30 21:11:11 -08:00
2023-01-30 21:11:11 -08:00
2017-09-05 15:35:26 +02:00
2021-02-22 09:58:22 -08:00
2022-02-28 13:45:21 -08:00

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 WorkspaceFolder is opened using workspace.workspaceFolders API
  • shows the name of the WorkspaceFolder the file is from (if any) using workspace.getWorkspaceFolder() API
  • updates when there are changes to the number of WorkspaceFolder via the workspace.onDidChangeWorkspaceFolders() API
  • registers a setting multiRootSample.statusColor with a scope of resource to configure a color per WorkspaceFolder to use for the status bar item

Show the folder of the active file

Running the example

  • Open this example in VS Code
  • npm install
  • npm run compile
  • F5 to start debugging