2018-11-15 18:42:11 +01:00
|
|
|
# Virtual Document Sample
|
|
|
|
|
|
|
|
|
|
This is a sample extension that shows how to add virtual documents to the editor.
|
|
|
|
|
|
2021-02-22 09:58:22 -08:00
|
|
|

|
2018-11-15 18:42:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
## VS Code API
|
|
|
|
|
|
|
|
|
|
### `vscode` module
|
|
|
|
|
|
2018-12-16 21:08:20 -08:00
|
|
|
- [`workspace.registerTextDocumentContentProvider`](https://code.visualstudio.com/api/references/vscode-api#workspace.registerTextDocumentContentProvider)
|
|
|
|
|
- [`commands.registerCommand`](https://code.visualstudio.com/api/references/vscode-api#commands.registerCommand)
|
|
|
|
|
- [`window.showInputBox`](https://code.visualstudio.com/api/references/vscode-api#window.showInputBox)
|
2019-04-16 09:59:21 -07:00
|
|
|
|
|
|
|
|
## Running the Sample
|
|
|
|
|
|
|
|
|
|
- Run `npm install` in terminal to install dependencies
|
|
|
|
|
- Run the `Launch Extension` target in the Debug View. This will:
|
|
|
|
|
- Start a task `npm: watch` to compile the code
|
|
|
|
|
- Run the extension in a new VS Code window
|