Files
vscode-extension-samples/theme-sample/README.md

34 lines
1.5 KiB
Markdown
Raw Normal View History

2018-10-31 23:58:09 -07:00
# Theme Samples
2018-11-01 10:16:05 -07:00
This sample color theme extension contains two TextMate themes.
2018-10-31 23:58:09 -07:00
Text Mate themes describe the theming rules used for syntax highlighting. Each rule consists of one or more scope selectors and a set of styles. To learn more about scopes and how they're used, check out the [color theme](https://code.visualstudio.com/api/extension-guides/color-theme) documentation.
2018-10-31 23:58:09 -07:00
You can directly use .tmTheme files in your extensions or import/convert them with VS Code's extension generator [yo code](https://code.visualstudio.com/api/get-started/your-first-extension).
2018-10-31 23:58:09 -07:00
2018-11-01 10:16:05 -07:00
## Demo
Sample Light
![Sample light](./demo-light.png)
Sample Dark
![Sample dark](./demo-dark.png)
## VS Code API
### Contribution Points
2018-12-21 10:06:05 -08:00
- [contributes.themes](https://code.visualstudio.com/api/references/contribution-points#contributes.themes)
2018-11-01 10:16:05 -07:00
2018-10-31 23:58:09 -07:00
## Running the sample
- Press `F5` to open a new window with your extension loaded.
2018-11-01 10:16:05 -07:00
- Open `File > Preferences > Color Themes` (or `Code > Preferences > Color Theme` on macOS), and pick `Sample Light` or `Sample Dark`.
2021-07-14 12:23:20 +09:00
- Open a file that has a language associated. The languages' configured grammar will tokenize the text and assign 'scopes' to the tokens. To examine these scopes, invoke the `Inspect TM Scopes` command from the Command Palette (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) .
2018-10-31 23:58:09 -07:00
## Make changes
- You can relaunch the extension from the debug toolbar after making changes to the files listed above.
- You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.